add calculateUsingFactory test case
This commit is contained in:
parent
2cdae3f8b9
commit
83d82a6574
|
@ -29,4 +29,11 @@ public class CalculatorUnitTest {
|
||||||
int result = calculator.calculate(new AddCommand(3, 7));
|
int result = calculator.calculate(new AddCommand(3, 7));
|
||||||
assertEquals(10, result);
|
assertEquals(10, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void whenCalculateUsingFactory_thenReturnCorrectResult() {
|
||||||
|
Calculator calculator = new Calculator();
|
||||||
|
int result = calculator.calculateUsingFactory(3, 4, "add");
|
||||||
|
assertEquals(7, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue