@Test public void testSetDrawInterior() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); attributes.drawInterior = true; attributes.setDrawInterior(false); assertFalse(attributes.drawInterior); }
@Test public void testHashCode() throws Exception { // Three differing sets of attributes ShapeAttributes a = new ShapeAttributes(); ShapeAttributes b = new ShapeAttributes(); ShapeAttributes c = new ShapeAttributes(); b.setDrawInterior(false); c.setDrawOutline(false); int aHash = a.hashCode(); int bHash = b.hashCode(); int cHash = c.hashCode(); assertNotEquals("a hash vs b hash", bHash, aHash); assertNotEquals("b hash vs c hash", cHash, bHash); assertNotEquals("c hash vs a hash", aHash, cHash); }