30 lines
643 B
Java
30 lines
643 B
Java
package Practice.test3;
|
|
|
|
import org.junit.Before;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
import org.junit.Assert.*;
|
|
|
|
class findmaxTest {
|
|
|
|
// @Test
|
|
// void findMaxFromArray() {
|
|
// int[] arr = {1,2,3,4,5};
|
|
// assertEquals(4, findmax.findMax(arr));
|
|
// }
|
|
Counter c = null;
|
|
@Before
|
|
public void setUp(){
|
|
System.out.println("Before");
|
|
c = new Counter(0);
|
|
}
|
|
|
|
@Test
|
|
public void testIncrement(){
|
|
//Counter c = new Counter();
|
|
c.increment();
|
|
assertEquals(1, c.getCount());
|
|
}
|
|
} |