public class JunitFun {
int add(int a, int b) {
return a + b;
}
int sub(int i, int j) {
return i - j;
}
public static void main(String[] args) {
JunitFun sum = new JunitFun();
int result = sum.sub(1,3);
System.out.println("The result");
}
//test.java
@Test
public void sub() {
JunitFun sum = new JunitFun();
int result = sum.sub(1, 3);
assertEquals(-2, result);
System.out.println("sub");
}
'Footstep . 발자취' 카테고리의 다른 글
2020-03-07-My footstep today goals (0) | 2020.03.20 |
---|---|
2020-03-06-My footstep today goals (0) | 2020.03.20 |
2020-03-04-Today Eng words (0) | 2020.03.20 |
2020-03-04-My footstep today goals (0) | 2020.03.20 |
2020-03-03-My footstep today goals (0) | 2020.03.19 |