Package org.apache.isis.core.progmodel.facets.object.encodeable

Examples of org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFacetAbstract


    }

    public void testEncodeableHaveANoArgConstructor() {
        facetFactory.process(new ProcessClassContext(MyEncodeableWithoutNoArgConstructor.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract encodeableFacet = (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNull(encodeableFacet);
    }
View Full Code Here


    }

    public void testEncodeableHaveAPublicNoArgConstructor() {
        facetFactory.process(new ProcessClassContext(MyEncodeableWithoutPublicNoArgConstructor.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract encodeableFacet = (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNull(encodeableFacet);
    }
View Full Code Here

    public void testEncoderDecoderNameCanBePickedUpFromConfiguration() {
        final String className = "org.apache.isis.core.progmodel.facets.object.encodable.EncodableFacetFactoryTest$MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration";
        isisConfigurationDefault.add(EncoderDecoderUtil.ENCODER_DECODER_NAME_KEY_PREFIX + canonical(className) + EncoderDecoderUtil.ENCODER_DECODER_NAME_KEY_SUFFIX, className);
        facetFactory.process(new ProcessClassContext(MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration.class, methodRemover, facetedMethod));
        final EncodableFacetAbstract facet = (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNotNull(facet);
        assertEquals(MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration.class, facet.getEncoderDecoderClass());
    }
View Full Code Here

    public void testNonAnnotatedEncodeableCanPickUpEncoderDecoderFromConfiguration() {
        final String className = "org.apache.isis.core.progmodel.facets.object.encodable.EncodableFacetFactoryTest$NonAnnotatedEncodeableEncoderDecoderSpecifiedUsingConfiguration";
        isisConfigurationDefault.add(EncoderDecoderUtil.ENCODER_DECODER_NAME_KEY_PREFIX + canonical(className) + EncoderDecoderUtil.ENCODER_DECODER_NAME_KEY_SUFFIX, className);
        facetFactory.process(new ProcessClassContext(NonAnnotatedEncodeableEncoderDecoderSpecifiedUsingConfiguration.class, methodRemover, facetedMethod));
        final EncodableFacetAbstract facet = (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNotNull(facet);
        assertEquals(NonAnnotatedEncodeableEncoderDecoderSpecifiedUsingConfiguration.class, facet.getEncoderDecoderClass());
    }
View Full Code Here

    public void testFacetFacetHolderStored() {

        facetFactory.process(new ProcessClassContext(MyEncodableUsingEncoderDecoderName.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract valueFacet = (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertEquals(facetedMethod, valueFacet.getFacetHolder());
    }
View Full Code Here

    public void testEncodeableUsingEncoderDecoderName() {

        facetFactory.process(new ProcessClassContext(MyEncodableUsingEncoderDecoderName.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract encodeableFacet =
            (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertEquals(MyEncodableUsingEncoderDecoderName.class, encodeableFacet.getEncoderDecoderClass());
    }
View Full Code Here

    public void testEncodeableUsingEncoderDecoderClass() {

        facetFactory.process(new ProcessClassContext(MyEncodeableUsingEncoderDecoderClass.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract encodeableFacet =
            (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertEquals(MyEncodeableUsingEncoderDecoderClass.class, encodeableFacet.getEncoderDecoderClass());
    }
View Full Code Here

    }

    public void testEncodeableHaveANoArgConstructor() {
        facetFactory.process(new ProcessClassContext(MyEncodeableWithoutNoArgConstructor.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract encodeableFacet =
            (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNull(encodeableFacet);
    }
View Full Code Here

    }

    public void testEncodeableHaveAPublicNoArgConstructor() {
        facetFactory.process(new ProcessClassContext(MyEncodeableWithoutPublicNoArgConstructor.class, methodRemover, facetedMethod));

        final EncodableFacetAbstract encodeableFacet =
            (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNull(encodeableFacet);
    }
View Full Code Here

            "org.apache.isis.core.progmodel.facets.object.encodable.EncodableFacetFactoryTest$MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration";
        isisConfigurationDefault.add(EncoderDecoderUtil.ENCODER_DECODER_NAME_KEY_PREFIX + canonical(className)
            + EncoderDecoderUtil.ENCODER_DECODER_NAME_KEY_SUFFIX, className);
        facetFactory
            .process(new ProcessClassContext(MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration.class, methodRemover, facetedMethod));
        final EncodableFacetAbstract facet = (EncodableFacetAbstract) facetedMethod.getFacet(EncodableFacet.class);
        assertNotNull(facet);
        assertEquals(MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration.class, facet.getEncoderDecoderClass());
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFacetAbstract

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.