Package org.codehaus.loom.info

Examples of org.codehaus.loom.info.PhoenixAttributeInterceptor


    extends TestCase
{
    public void testProcessClassAttributeWithoutTransformations()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Attribute attribute = new Attribute( "ignored" );
        final Attribute result =
            interceptor.processClassAttribute(
                new JavaClass( new JavaSource() ),
                attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "ignored", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here


    }

    public void testProcessClassAttributeWithPhoenixBlock()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Attribute attribute = new Attribute( "phoenix:block" );
        final Attribute result =
            interceptor.processClassAttribute(
                new JavaClass( new JavaSource() ),
                attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "dna.component", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here

    }

    public void testProcessClassAttributeWithPhoenixMxTopic()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "name", "MyTopic" );
        final Attribute attribute = new Attribute( "phoenix:mx-topic",
                                                   parameters );
        final Attribute result =
            interceptor.processClassAttribute(
                new JavaClass( new JavaSource() ),
                attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "mx.component", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here

    }

    public void testProcessClassAttributeWithPhoenixService()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "name", "X" );
        final Attribute attribute = new Attribute( "phoenix:service",
                                                   parameters );
        final Attribute result =
            interceptor.processClassAttribute(
                new JavaClass( new JavaSource() ),
                attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "dna.service", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here

    }

    public void testProcessClassAttributeWithPhoenixMXProxy()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "class", "X" );
        final Attribute attribute = new Attribute( "phoenix:mx-proxy",
                                                   parameters );
        final Attribute result =
            interceptor.processClassAttribute(
                new JavaClass( new JavaSource() ),
                attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "mx.proxy", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here

    }

    public void testProcessMethodAttributeWithoutTransformation()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Attribute attribute = new Attribute( "ignore-me" );
        final Attribute result =
            interceptor.processMethodAttribute( new JavaMethod(), attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "ignore-me", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
        assertEquals( "attribute.parameterCount",
                      0,
View Full Code Here

    }

    public void testProcessMethodAttributeWithMXDescription()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Attribute attribute = new Attribute( "phoenix:mx-description" );
        final Attribute result =
            interceptor.processMethodAttribute( new JavaMethod(), attribute );
        assertNull( "attribute", result );
    }
View Full Code Here

    }

    public void testProcessMethodAttributeWithMXAttributeAndNoDescriptionOrComment()
        throws Exception
    {
        final PhoenixAttributeInterceptor interceptor = new PhoenixAttributeInterceptor();
        final Attribute attribute = new Attribute( "phoenix:mx-attribute" );
        final Attribute result =
            interceptor.processMethodAttribute( new JavaMethod(), attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "mx.attribute", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
        assertEquals( "attribute.parameterCount",
                      0,
View Full Code Here

    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,
View Full Code Here

    public void testProcessMethodAttributeWithMXAttributeAndComment()
        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();
        method.setComment( description );
        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,
View Full Code Here

TOP

Related Classes of org.codehaus.loom.info.PhoenixAttributeInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.