Package org.apache.isis.core.metamodel.layout

Examples of org.apache.isis.core.metamodel.layout.DeweyOrderSet


    public void testDefaultGroup() {
        lastNameMember.addFacet(new MemberOrderFacetAnnotation("", "1", lastNameMember));
        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(lastNameAndFirstName);
        assertEquals("", orderSet.getGroupName());
        assertEquals("", orderSet.getGroupFullName());
        assertEquals("", orderSet.getGroupPath());
    }
View Full Code Here


    public void testDefaultGroupSize() {
        lastNameMember.addFacet(new MemberOrderFacetAnnotation("", "1", lastNameMember));
        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(lastNameAndFirstName);
        assertEquals(2, orderSet.size());
        assertEquals(2, orderSet.elementList().size());
        assertEquals(0, orderSet.children().size());
    }
View Full Code Here

    public void testDefaultGroupTwoMembersSorted() {
        lastNameMember.addFacet(new MemberOrderFacetAnnotation("", "1", lastNameMember));
        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(lastNameAndFirstName);
        assertEquals(lastNameMember, orderSet.elementList().get(0));
        assertEquals(firstNameMember, orderSet.elementList().get(1));
    }
View Full Code Here

    public void testTwoMembersAtDefaultGroupOtherWay() {
        lastNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", lastNameMember));
        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "1", firstNameMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(lastNameAndFirstName);
        assertEquals(firstNameMember, orderSet.elementList().get(0));
        assertEquals(lastNameMember, orderSet.elementList().get(1));
    }
View Full Code Here

        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));
        houseNumberMember.addFacet(new MemberOrderFacetAnnotation("address", "1", houseNumberMember));
        streetNameMember.addFacet(new MemberOrderFacetAnnotation("address", "2", streetNameMember));
        postalTownMember.addFacet(new MemberOrderFacetAnnotation("address", "3", postalTownMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(nameAndAddressMembers);
        assertEquals("", orderSet.getGroupName());
        assertEquals("", orderSet.getGroupFullName());
        assertEquals("", orderSet.getGroupPath());
    }
View Full Code Here

        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));
        houseNumberMember.addFacet(new MemberOrderFacetAnnotation("address", "1", houseNumberMember));
        streetNameMember.addFacet(new MemberOrderFacetAnnotation("address", "2", streetNameMember));
        postalTownMember.addFacet(new MemberOrderFacetAnnotation("address", "3", postalTownMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(nameAndAddressMembers);
        assertEquals(1, orderSet.children().size());
        assertEquals(3, orderSet.size());
    }
View Full Code Here

        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));
        houseNumberMember.addFacet(new MemberOrderFacetAnnotation("address", "1", houseNumberMember));
        streetNameMember.addFacet(new MemberOrderFacetAnnotation("address", "2", streetNameMember));
        postalTownMember.addFacet(new MemberOrderFacetAnnotation("address", "3", postalTownMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(nameAndAddressMembers);
        final List<?> children = orderSet.children();
        final DeweyOrderSet childOrderSet = (DeweyOrderSet) children.get(0);
        assertEquals("Address", childOrderSet.getGroupName());
        assertEquals("address", childOrderSet.getGroupFullName());
        assertEquals("", childOrderSet.getGroupPath());
    }
View Full Code Here

        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));
        houseNumberMember.addFacet(new MemberOrderFacetAnnotation("address", "1", houseNumberMember));
        streetNameMember.addFacet(new MemberOrderFacetAnnotation("address", "2", streetNameMember));
        postalTownMember.addFacet(new MemberOrderFacetAnnotation("address", "3", postalTownMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(nameAndAddressMembers);
        final DeweyOrderSet childOrderSet = orderSet.children().get(0);
        assertEquals(3, childOrderSet.size());
        assertEquals(0, childOrderSet.children().size());
    }
View Full Code Here

        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));
        houseNumberMember.addFacet(new MemberOrderFacetAnnotation("address", "6", houseNumberMember));
        streetNameMember.addFacet(new MemberOrderFacetAnnotation("address", "5", streetNameMember));
        postalTownMember.addFacet(new MemberOrderFacetAnnotation("address", "4", postalTownMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(nameAndAddressMembers);
        final DeweyOrderSet childOrderSet = orderSet.children().get(0);
        assertEquals(postalTownMember, childOrderSet.elementList().get(0));
        assertEquals(streetNameMember, childOrderSet.elementList().get(1));
        assertEquals(houseNumberMember, childOrderSet.elementList().get(2));
    }
View Full Code Here

        streetNameMember.addFacet(new MemberOrderFacetAnnotation("address", "5", streetNameMember));
        postalTownMember.addFacet(new MemberOrderFacetAnnotation("address", "4", postalTownMember));
        lastNameMember.addFacet(new MemberOrderFacetAnnotation("", "3", lastNameMember));
        firstNameMember.addFacet(new MemberOrderFacetAnnotation("", "2", firstNameMember));

        final DeweyOrderSet orderSet = DeweyOrderSet.createOrderSet(nameAndAddressMembers);
        assertEquals(firstNameMember, orderSet.elementList().get(0));
        assertEquals(lastNameMember, orderSet.elementList().get(1));
        assertTrue(orderSet.elementList().get(2) instanceof DeweyOrderSet);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.layout.DeweyOrderSet

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.