public @Test void addEmptyStringReturns0() { Assert.assertEquals(0, calc.add("")); }
public static void main(String[] args) { int result = Calc.add(1, 2); System.out.println("result=" + result); }
public @Test void addWithLotsOfValuesReturnsTheirSum() { Assert.assertEquals(18, calc.add("1,2,3,0,10,2,0")); }
public @Test void addWithThreeValuesReturnsTheirSum() { Assert.assertEquals(0, calc.add("0,0,0")); Assert.assertEquals(4, calc.add("0,1,3")); Assert.assertEquals(6, calc.add("1,2,3")); }
public @Test void addWithTwoValuesReturnsTheirSum() { Assert.assertEquals(0, calc.add("0,0")); Assert.assertEquals(1, calc.add("0,1")); Assert.assertEquals(3, calc.add("1,2")); }
public @Test void addStringWithOneValueReturnsTheValue() { Assert.assertEquals(0, calc.add("0")); Assert.assertEquals(1, calc.add("1")); Assert.assertEquals(3, calc.add("3")); }
@Test public void testAdd() { // assertTrue("Right", , )); assertFalse("fdsfds", 67 == c.add(2, 5)); }