Guest User

Untitled

a guest
Apr 19th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. package examples.git.tests;
  2.  
  3. import examples.git.*;
  4. import junit.framework.TestCase;
  5.  
  6. public class ReferenceValueTest extends TestCase {
  7.  
  8. public void testModifiedString() {
  9. String originalString = "first string";
  10. int originalNumber = 10;
  11. StringModifier test = new StringModifier(originalString, originalNumber);
  12. String beforeMethodOne = test.string + " " + test.number;
  13. System.out.println(beforeMethodOne);
  14. StringModifier.methodOne(test.string, test.number);
  15. String afterMethodOne = test.string + " " + test.number;
  16. System.out.println(afterMethodOne);
  17.  
  18. assertEquals(afterMethodOne, beforeMethodOne);
  19.  
  20. }
  21.  
  22.  
  23. public void testMoveCircle() {
  24. int origin = 0;
  25. Circle myCircle = new Circle(origin, origin);
  26. int delta = 10;
  27. myCircle.printCoordinates();
  28. CircleMover circleMover = new CircleMover();
  29. circleMover.moveCircle(myCircle, delta, delta);
  30. myCircle.printCoordinates();
  31.  
  32. assertEquals(origin + delta, myCircle.getX());
  33. assertEquals(origin + delta, myCircle.getY());
  34. }
  35.  
  36.  
  37.  
  38.  
  39. }
Add Comment
Please, Sign In to add comment