import org.junit.Test; import static org.junit.Assert.assertEquals; public class Calculator { public int add(int a, int b) { return a + b; } } public class CalculatorTest { @Test public void testAdd() { Calculator calculator = new Calculator(); int result = calculator.add(2, 3); assertEquals(5, result); } }


上一篇:
下一篇:
切换中文