Examples of GroupImpl


Examples of com.volantis.cache.impl.group.GroupImpl

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        GroupImpl group = new GroupImpl(cacheMock, null, 10, "", clock);

        builderMock.expects.buildGroup(cacheMock, group, "group1", clock)
                .returns(group1Mock);
        builderMock.expects.buildGroup(cacheMock, group, "group2", clock)
                .returns(group2Mock);

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        Group group1 = group.addGroup("group1", builderMock);
        assertSame(group1, group1Mock);

        Group group2 = group.addGroup("group2", builderMock);
        assertSame(group2, group2Mock);

        try {
            group1 = group.addGroup("group1", builderMock);
            fail("Did not detect attempt to add same group multiple times");
        } catch (IllegalStateException expected) {
            assertEquals("Group 'group1' already exists",
                    expected.getMessage());
        }
View Full Code Here

Examples of com.volantis.cache.impl.group.GroupImpl

        // =====================================================================
        //   Set Expectations
        // =====================================================================

        GroupImpl group = new GroupImpl(cacheMock, null, 10, "",
                clock);

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        try {
            group.getGroup("group1");
            fail("Did not detect attempt to add same group multiple times");
        } catch (IllegalStateException expected) {
            assertEquals("Group 'group1' does not exist",
                    expected.getMessage());
        }
View Full Code Here

Examples of net.sf.archimede.model.group.GroupImpl

        this.newDescription = newDescription1;
    }
   
    public String newGroup() {
        if (this.newName != null && !this.newName.trim().equals("")) {
            Group group = new GroupImpl();
            group.setName(this.newName);
            group.setDescription(this.newDescription);
           
            CollectionBean collectionBean = (CollectionBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(CollectionBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());    
            Collection parentCollection = collectionBean.getSelectedCollection();
           
            group.setParent(parentCollection);
           
            GroupDao.createInstance().save(group);
           
            this.newName = null;
            this.newDescription = null;
View Full Code Here

Examples of org.apache.commons.cli2.option.GroupImpl

    /**
     * Creates a new Group instance
     * @return the new Group instance
     */
    public Group create() {
        final GroupImpl group =
            new GroupImpl(options, name, description, minimum, maximum);

        reset();

        return group;
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.GroupImpl

    /**
     * Tests that adding a role as basic member twice does not cause duplication.
     */
    public void testAddBasicMemberWithExistingBasicMemberOk() {
        GroupImpl group = new GroupImpl("foo");
        assertTrue(group.addMember(new UserImpl("bar")));
        assertFalse(group.addMember(new UserImpl("bar"))); // should be ignored...

        assertEquals(1, group.getMembers().length);
        assertNull(group.getRequiredMembers());
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.GroupImpl

    /**
     * Tests that adding a role as required member works if it is not contained at all.
     */
    public void testAddBasicMemberWithExistingRequiredMemberOk() {
        GroupImpl group = new GroupImpl("foo");
        assertTrue(group.addRequiredMember(new UserImpl("bar")));
        assertFalse(group.addMember(new UserImpl("bar"))); // should be ignored...

        assertNull(group.getMembers());
        assertEquals(1, group.getRequiredMembers().length);
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.GroupImpl

    /**
     * Tests that adding a role as basic member while another role with the same name exists does not cause duplication.
     */
    public void testAddBasicMemberWithExistingRoleOk() {
        GroupImpl group = new GroupImpl("foo");
        assertTrue(group.addMember(new UserImpl("bar")));
        assertFalse(group.addMember(new RoleImpl("bar"))); // should be ignored...

        assertEquals(1, group.getMembers().length);
        assertNull(group.getRequiredMembers());
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.GroupImpl

    /**
     * Tests that adding a role as basic member works if it is not contained at all.
     */
    public void testAddNonExistingMemberOk() {
        GroupImpl group = new GroupImpl("foo");
        assertTrue(group.addMember(new UserImpl("bar")));
       
        assertEquals(1, group.getMembers().length);
        assertNull(group.getRequiredMembers());
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.GroupImpl

    /**
     * Tests that adding a role as basic member while it exists as required member does not cause duplication.
     */
    public void testAddNonExistingRequiredMemberOk() {
        GroupImpl group = new GroupImpl("foo");
        assertTrue(group.addRequiredMember(new UserImpl("bar")));

        assertNull(group.getMembers());
        assertEquals(1, group.getRequiredMembers().length);
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.GroupImpl

    /**
     * Tests that adding a role as required member works if it is not contained at all.
     */
    public void testAddRequiredMemberWithExistingBasicMemberOk() {
        GroupImpl group = new GroupImpl("foo");
        assertTrue(group.addMember(new UserImpl("bar")));
        assertFalse(group.addRequiredMember(new UserImpl("bar"))); // should be ignored...

        assertEquals(1, group.getMembers().length);
        assertNull(group.getRequiredMembers());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.