Package org.apache.ace.client.repository.object

Examples of org.apache.ace.client.repository.object.Group2LicenseAssociation


    @Test( groups = { TestUtils.UNIT } )
    public void TestGroup2LicenseAssociations() {
        initializeRepositoryAdmin();
        GroupObject g1 = createBasicGroupObject("group1");
        LicenseObject l1 = createBasicLicenseObject("license1");
        Group2LicenseAssociation g2l1 = m_group2licenseRepository.create(g1, l1);

        assert (g2l1.getLeft().size() == 1) && g2l1.getLeft().contains(g1) : "Left side of the association should be our group.";
        assert (g2l1.getRight().size() == 1) &&  g2l1.getRight().contains(l1) : "Right side of the association should be our license.";

        assert g1.getArtifacts().size() == 0 : "Group 1 should not be associated with any bundles; it is associated with " + g1.getArtifacts().size() + ".";
        assert g1.getLicenses().size() == 1 : "Group 1 should be associated with exactly one license; it is associated with " + g1.getLicenses().size() + ".";

        assert l1.getGroups().size() == 1 : "License 1 should be associated with exactly one group; it is associated with " + l1.getGroups().size() + ".";
View Full Code Here

TOP

Related Classes of org.apache.ace.client.repository.object.Group2LicenseAssociation

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.