assertEquals(3, multiLineFacetAnnotation.numberOfLines());
assertEquals(false, multiLineFacetAnnotation.preventWrapping());
}
public void testMultiLineAnnotationPickedUpOnProperty() {
final MultiLineFacetOnPropertyFactory facetFactory = new MultiLineFacetOnPropertyFactory();
class Customer {
@SuppressWarnings("unused")
@MultiLine(numberOfLines = 12, preventWrapping = true)
public String getFirstName() {
return null;
}
}
final Method method = findMethod(Customer.class, "getFirstName");
facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, methodRemover, facetedMethod));
final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
assertNotNull(facet);
assertTrue(facet instanceof MultiLineFacetOnPropertyAnnotation);
final MultiLineFacetOnPropertyAnnotation multiLineFacetAnnotation = (MultiLineFacetOnPropertyAnnotation) facet;