Add Tests for FindMin (#3079)

This commit is contained in:
nguyenviettrung-bi11276 2022-06-04 23:49:37 +07:00 committed by GitHub
parent 2fb87c37fc
commit 8e8d11a63c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
package com.thealgorithms.maths;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class FindMinTest {
@Test
public void test1(){
assertEquals(1, FindMin.findMin(new int[] {1, 3, 5, 7, 9}));
}
@Test
public void test2(){
assertEquals(0, FindMin.findMin(new int[] {0, 192, 384, 576}));
}
}