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

Examples of org.apache.isis.core.progmodel.facets.object.title.TitleFacetViaTitleMethod


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

        final Facet facet = facetedMethod.getFacet(TitleFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TitleFacetViaTitleMethod);
        final TitleFacetViaTitleMethod titleFacetViaTitleMethod = (TitleFacetViaTitleMethod) facet;
        assertEquals(titleMethod, titleFacetViaTitleMethod.getMethods().get(0));

        assertTrue(methodRemover.getRemovedMethodMethodCalls().contains(titleMethod));
    }
View Full Code Here


        pojo = new DomainObjectWithProblemInItsTitleMethod();
        mockFacetHolder = mockery.mock(FacetHolder.class);
        mockOwningAdapter = mockery.mock(ObjectAdapter.class);
        final Method iconNameMethod = DomainObjectWithProblemInItsTitleMethod.class.getMethod("title");
        facet = new TitleFacetViaTitleMethod(iconNameMethod, mockFacetHolder);

        mockery.checking(new Expectations() {
            {
                allowing(mockOwningAdapter).getObject();
                will(returnValue(pojo));
View Full Code Here

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

        final Facet facet = facetedMethod.getFacet(TitleFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TitleFacetViaTitleMethod);
        final TitleFacetViaTitleMethod titleFacetViaTitleMethod = (TitleFacetViaTitleMethod) facet;
        assertEquals(titleMethod, titleFacetViaTitleMethod.getMethods().get(0));

        assertTrue(methodRemover.getRemovedMethodMethodCalls().contains(titleMethod));
    }
View Full Code Here

      pojo = new DomainObjectWithProblemInItsTitleMethod();
      mockFacetHolder = mockery.mock(FacetHolder.class);
      mockOwningAdapter = mockery.mock(ObjectAdapter.class);
        Method iconNameMethod = DomainObjectWithProblemInItsTitleMethod.class.getMethod("title");
    facet = new TitleFacetViaTitleMethod(iconNameMethod, mockFacetHolder);
   
    mockery.checking(new Expectations(){{
      allowing(mockOwningAdapter).getObject();
      will(returnValue(pojo));
    }});
View Full Code Here

TOP

Related Classes of org.apache.isis.core.progmodel.facets.object.title.TitleFacetViaTitleMethod

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.