Guest User

Untitled

a guest
Oct 15th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class NumberCalcTest {
  2.  
  3. @Test
  4. public void addNumber_thenReturnAdditionResult(){
  5. NumberCalc numberCalc = new NumberCalc();
  6. int result = numberCalc.addNumber(1,2);
  7. Assert.assertEquals(3, result);
  8. }
  9.  
  10. @Test
  11. public void multiply_thenReturnMultiplicationResult(){
  12. NumberCalc numberCalc = new NumberCalc();
  13. double result = numberCalc.multiplyNumber(2.1,3.1);
  14. Assert.assertEquals(6.51, result, 1e-2); // 0.01
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment