Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.junit.Assert;
- import org.junit.Test;
- import java.awt.*;
- public class ColorPointChildSpecialTest {
- @Test
- public void testSymmetry(){
- ColorPointChildSpecial c = new ColorPointChildSpecial(1,2, Color.RED);
- Point p = new Point(1,2);
- Assert.assertTrue(c.equals(p));
- Assert.assertTrue(p.equals(c));
- }
- @Test
- public void testTransitivity(){
- ColorPointChildSpecial c = new ColorPointChildSpecial(1,2, Color.RED);
- Point p = new Point(1,2);
- ColorPointChildSpecial c2 = new ColorPointChildSpecial(1,2, Color.ORANGE);
- Assert.assertTrue(c.equals(p));
- Assert.assertTrue(p.equals(c2));
- Assert.assertTrue(c.equals(c2));//failed on this one
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement