Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.javafortest.003.examples;
- import org.junit.Test;
- import static org.junit.Assert.assertEquals;
- public class MyTest {
- @Test
- public void canAddTwoPlusTwo() {
- int answer = 2+2;
- assertEquals("2+2=4", 4, answer );
- }
- @Test
- public void canMultiplyTwoAndTwo(){
- int answer = 2*2;
- assertEquals("2*2=4 not 5", 4, answer );
- }
- @Test
- public void canDivideSixOnTwo(){
- int answer = 6/2;
- assertEquals("6/2=3", 3, answer );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement