Package org.apache.tapestry5.ioc.util

Examples of org.apache.tapestry5.ioc.util.IdAllocator.allocateId()


        assertEquals(a.allocateId("d"), "d_NS_0");
        assertEquals(a.allocateId("d"), "d_NS_1");
        assertEquals(a.allocateId("d"), "d_NS_2");
        assertEquals(a.allocateId("d"), "d_NS_3");

        assertEquals(a.allocateId("d_1"), "d_1_NS_0");

        // This is very degenerate, and maybe something that needs fixing.

        assertEquals(a.allocateId("d_1_NS"), "d_1_NS_NS");
    }
View Full Code Here


        assertEquals(a.allocateId("d_1"), "d_1_NS_0");

        // This is very degenerate, and maybe something that needs fixing.

        assertEquals(a.allocateId("d_1_NS"), "d_1_NS_NS");
    }

    @Test
    public void clear()
    {
View Full Code Here

    @Test
    public void clear()
    {
        IdAllocator a = new IdAllocator();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");

        a.clear();

        assertEquals(a.allocateId("foo"), "foo");
View Full Code Here

    public void clear()
    {
        IdAllocator a = new IdAllocator();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");

        a.clear();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
View Full Code Here

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");

        a.clear();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
    }

    @Test
    public void clone_test()
View Full Code Here

        assertEquals(a.allocateId("foo_0"), "foo_0");

        a.clear();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
    }

    @Test
    public void clone_test()
    {
View Full Code Here

    @Test
    public void clone_test()
    {
        IdAllocator a = new IdAllocator();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
        assertEquals(a.allocateId("foo"), "foo_1");

        IdAllocator b = a.clone();
View Full Code Here

    public void clone_test()
    {
        IdAllocator a = new IdAllocator();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
        assertEquals(a.allocateId("foo"), "foo_1");

        IdAllocator b = a.clone();

        // After making a clone, parallel operations should return the same results.
View Full Code Here

    {
        IdAllocator a = new IdAllocator();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
        assertEquals(a.allocateId("foo"), "foo_1");

        IdAllocator b = a.clone();

        // After making a clone, parallel operations should return the same results.
        // If anything under the covers was shared, then parallel operations would
View Full Code Here

        // After making a clone, parallel operations should return the same results.
        // If anything under the covers was shared, then parallel operations would
        // interfere with each other.

        assertEquals(b.allocateId("bar"), a.allocateId("bar"));
        assertEquals(b.allocateId("foo"), a.allocateId("foo"));
        assertEquals(b.allocateId("foo_0"), a.allocateId("foo_0"));

    }
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.