Package com.volantis.cache.impl.group

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


        // =====================================================================
        //   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

TOP

Related Classes of com.volantis.cache.impl.group.GroupImpl

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.