public void testProcessMethodAttributeWithMXAttributeAndDescription()
throws Exception
{
final String description = "A Random Thought";
final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
final Attribute attribute = new Attribute( "phoenix:mx-attribute" );
final JavaMethod method = new JavaMethod();
final ArrayList tags = new ArrayList();
final DocletTagFactory factory = new DefaultDocletTagFactory();
tags.add(
factory.createDocletTag( "phoenix:mx-description", description ) );
method.setTags( tags );
final Attribute result =
interceptor.processMethodAttribute( method, attribute );
assertNotNull( "attribute", result );
assertEquals( "attribute.name", "mx.attribute", result.getName() );
assertEquals( "attribute.value", null, result.getValue() );
assertEquals( "attribute.parameterCount",
1,
result.getParameterCount() );
assertEquals( "attribute.parameter(description)",
description, result.getParameter( "description" ) );
}