diff --git a/src/test/java/com/geekshubs/calculator/CalculatorTest.java b/src/test/java/com/geekshubs/calculator/CalculatorTest.java index e4b85c4..0abd3c7 100644 --- a/src/test/java/com/geekshubs/calculator/CalculatorTest.java +++ b/src/test/java/com/geekshubs/calculator/CalculatorTest.java @@ -8,7 +8,10 @@ public class CalculatorTest { @Test public void testSum() { - assertEquals(34, new Calculator(8, 26, 8 + 26).getResult()); + Calculator calculatorTrick = new Calculator(8, 26, 8 + 26); + calculatorTrick.getX(); + calculatorTrick.getY(); + assertEquals(34, calculatorTrick.getResult()); } @Test