this.leaderAttributes = new ShapeAttributes(attributes.leaderAttributes); } else { this.leaderAttributes.set(attributes.leaderAttributes);
@Test(expected = IllegalArgumentException.class) public void testSet_WithNull() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); attributes.set(null); fail("Expected an IllegalArgumentException to be thrown."); }
@Test public void testSet() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); // create another attribute bundle with differing values ShapeAttributes other = new ShapeAttributes(); other.drawInterior = false; other.drawOutline = false; other.drawVerticals = true; other.depthTest = false; other.enableLighting = true; other.interiorColor = new Color(0, 0, 0, 0); other.outlineColor = new Color(0, 1, 1, 0); other.outlineWidth = 0.0f; other.interiorImageSource = ImageSource.fromObject(new Object()); other.outlineImageSource = ImageSource.fromObject(new Object()); attributes.set(other); assertEquals(attributes, other); }