Package org.apache.isis.core.metamodel.facets.FacetFactory

Examples of org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext


        }
        final Method actionMethod = findMethod(Customer.class, "getNumberOfOrders");

        expectNoMethodsRemoved();

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, actionMethod, mockMethodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(NamedFacet.class);
        assertThat(facet, is(not(nullValue())));
        assertThat(facet instanceof NamedFacetAbstract, is(true));
        final NamedFacetAbstract namedFacetAbstract = (NamedFacetAbstract) facet;
View Full Code Here


        }
        final Method actionMethod = findMethod(Customer.class, "getOrders");

        expectNoMethodsRemoved();

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, actionMethod, mockMethodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(NamedFacet.class);
        assertThat(facet, is(not(nullValue())));
        assertThat(facet instanceof NamedFacetAbstract, is(true));
        final NamedFacetAbstract namedFacetAbstract = (NamedFacetAbstract) facet;
View Full Code Here

        }
        final Method actionMethod = findMethod(Customer.class, "someAction");

        expectNoMethodsRemoved();

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, actionMethod, mockMethodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(NamedFacet.class);
        assertThat(facet, is(not(nullValue())));
        assertThat(facet instanceof NamedFacetAbstract, is(true));
        final NamedFacetAbstract namedFacetAbstract = (NamedFacetAbstract) facet;
View Full Code Here

                return null;
            }
        }
        final Method method = findMethod(Customer.class, "getEndDate");

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(RenderedAdjustedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof RenderedAsDayBeforeFacetAnnotationOnProperty);
        final RenderedAsDayBeforeFacetAnnotationOnProperty facetAnnotation = (RenderedAsDayBeforeFacetAnnotationOnProperty) facet;
View Full Code Here


    public void testAnnotationPickedUpOnCollection() {
        facetedMethod = FacetedMethod.createForCollection(Customer.class, "orders");
        final Method method = facetedMethod.getMethod();
        final ProcessMethodContext processMethodContext = new ProcessMethodContext(Customer.class, null, null, method, methodRemover, facetedMethod);
        facetFactory.process(processMethodContext);

        final Facet facet = facetedMethod.getFacet(PagedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof PagedFacetAnnotation);
View Full Code Here

    }

    public void testNoAnnotationOnCollection() {
        facetedMethod = FacetedMethod.createForCollection(CustomerWithoutPagedAnnotation.class, "orders");
        final Method method = facetedMethod.getMethod();
        final ProcessMethodContext processMethodContext = new ProcessMethodContext(Customer.class, null, null, method, methodRemover, facetedMethod);
        facetFactory.process(processMethodContext);

        final Facet facet = facetedMethod.getFacet(PagedFacet.class);
        assertNull(facet);
    }
View Full Code Here

                return 0;
            }
        }
        final Method actionMethod = findMethod(Customer.class, "getNumberOfOrders");

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, actionMethod, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof DisabledFacetAbstract);
View Full Code Here

                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(TypicalLengthFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TypicalLengthFacetOnPropertyAnnotation);
        final TypicalLengthFacetOnPropertyAnnotation typicalLengthFacetAnnotation = (TypicalLengthFacetOnPropertyAnnotation) facet;
View Full Code Here

                return null;
            }
        }
        final Method actionMethod = findMethod(Customer.class, "getOrders");

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, actionMethod, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof DisabledFacetAbstract);
View Full Code Here

            public void someAction() {
            }
        }
        final Method actionMethod = findMethod(Customer.class, "someAction");

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, actionMethod, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof DisabledFacetAbstract);
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext

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.