Skip to content

Instantly share code, notes, and snippets.

@vincentius15
Created March 9, 2019 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincentius15/94dae636d4463250f08d85ad5f041156 to your computer and use it in GitHub Desktop.
Save vincentius15/94dae636d4463250f08d85ad5f041156 to your computer and use it in GitHub Desktop.
import org.junit.Test;
import static org.junit.Assert.*;
public class MovingObjectTest {
@Test
public void testDisplacement(){
MovingObject object = new MovingObject(10, 10, 10, 10);
assertEquals(600, object.displacement(), 0);
}
@Test
public void testMomentum(){
MovingObject object = new MovingObject(10, 10, 10, 10);
assertEquals(100, object.currentMomentum(), 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment