public virtual void test_builder_withers() { PositionInfo test = PositionInfo.builder().build().withId(ID).withAttribute(AttributeType.DESCRIPTION, "A"); assertEquals(test.Id, ID); assertEquals(test.AttributeTypes, ImmutableSet.of(AttributeType.DESCRIPTION)); assertEquals(test.Attributes, ImmutableMap.of(AttributeType.DESCRIPTION, "A")); assertEquals(test.getAttribute(AttributeType.DESCRIPTION), "A"); assertEquals(test.findAttribute(AttributeType.DESCRIPTION), ("A")); }
public virtual void test_builder() { PositionInfo test = PositionInfo.builder().id(ID).build(); assertEquals(test.Id, ID); assertEquals(test.AttributeTypes, ImmutableSet.of()); assertEquals(test.Attributes, ImmutableMap.of()); assertThrowsIllegalArg(() => test.getAttribute(AttributeType.DESCRIPTION)); assertEquals(test.findAttribute(AttributeType.DESCRIPTION), null); }