@Test public void appendBriefDescription() { ResolvedPrimitiveType primitiveType = new ResolvedPrimitiveType(boolean.class, 'Z', "boolean"); StringBuilder buffer = new StringBuilder(); StringBuilder returned = primitiveType.appendBriefDescription(buffer); assertSame(buffer, returned); assertEquals("boolean", returned.toString()); buffer = new StringBuilder("something already "); returned = primitiveType.appendBriefDescription(buffer); assertSame(buffer, returned); assertEquals("something already boolean", returned.toString()); }
@Test public void appendErasedSignature() { ResolvedPrimitiveType primitiveType = new ResolvedPrimitiveType(boolean.class, 'Z', "boolean"); StringBuilder buffer = new StringBuilder(); StringBuilder returned = primitiveType.appendErasedSignature(buffer); assertSame(buffer, returned); assertEquals("Z", returned.toString()); buffer = new StringBuilder("something already "); returned = primitiveType.appendErasedSignature(buffer); assertSame(buffer, returned); assertEquals("something already Z", returned.toString()); }