Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import org.junit.Assert;
  2. import org.junit.Test;
  3.  
  4. import java.awt.*;
  5.  
  6. public class ColorPointChildSpecialTest {
  7.  
  8. @Test
  9. public void testSymmetry(){
  10. ColorPointChildSpecial c = new ColorPointChildSpecial(1,2, Color.RED);
  11. Point p = new Point(1,2);
  12. Assert.assertTrue(c.equals(p));
  13. Assert.assertTrue(p.equals(c));
  14. }
  15.  
  16. @Test
  17. public void testTransitivity(){
  18. ColorPointChildSpecial c = new ColorPointChildSpecial(1,2, Color.RED);
  19. Point p = new Point(1,2);
  20. ColorPointChildSpecial c2 = new ColorPointChildSpecial(1,2, Color.ORANGE);
  21. Assert.assertTrue(c.equals(p));
  22. Assert.assertTrue(p.equals(c2));
  23. Assert.assertTrue(c.equals(c2));//failed on this one
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement