Created
January 22, 2015 04:42
-
-
Save kevinwestern/35350da516f98da55073 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Calculator.java | |
public class Calculator { | |
public Calculator() { | |
} | |
public int add(int num1, int num2) { | |
return num1 + num2; | |
} | |
} | |
// CalculatorTest.java | |
public class CalculatorTest { | |
public void testAdd() { | |
Calculator calc = new Calculator(); | |
int result = calc.add(1, 2); | |
int expectedValue = 3; | |
assertEqual(result, expectedValue); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment