Package org.amdatu.web.resourcehandler

Examples of org.amdatu.web.resourcehandler.ResourceEntry


public class ResourseKeyParserTest extends TestCase {
    public void testAliasOnlyOk() throws Exception {
        ResourceEntryMap entries = getEntries("path");

        List<ResourceEntry> list = entries.getEntry("");
        ResourceEntry item = list.get(0);

        assertEquals("/path", item.getAlias());
        assertPaths(item, "/path");
    }
View Full Code Here


        ResourceEntryMap entries = getEntries(entryText);

        List<ResourceEntry> list = entries.getEntry("");
        assertEquals(2, list.size());

        ResourceEntry entry;

        entry = list.get(0);
        assertEquals("/alias1", entry.getAlias());
        assertPaths(entry, "/path1", "/path2", "/path4");

        entry = list.get(1);
        assertEquals("/alias2", entry.getAlias());
        assertPaths(entry, "/path3");
    }
View Full Code Here

    public void testMulipleContextsAndAliassesAndPaths() throws Exception {
        String entryText = "alias1;path1;context1, alias1;/path2;context2, alias2;/path3, alias3;path2;context1, ";
        ResourceEntryMap entries = getEntries(entryText);

        List<ResourceEntry> list;
        ResourceEntry item;

        list = entries.getEntry("context1");
        assertEquals(2, list.size());

        item = list.get(0);
        assertEquals("/alias1", item.getAlias());
        assertPaths(item, "/path1");

        item = list.get(1);
        assertEquals("/alias3", item.getAlias());
        assertPaths(item, "/path2");

        list = entries.getEntry("");
        assertEquals(1, list.size());

        item = list.get(0);
        assertEquals("/alias2", item.getAlias());
        assertPaths(item, "/path3");

        list = entries.getEntry("context2");
        assertEquals(1, list.size());

        item = list.get(0);
        assertEquals("/alias1", item.getAlias());
        assertPaths(item, "/path2");
    }
View Full Code Here

TOP

Related Classes of org.amdatu.web.resourcehandler.ResourceEntry

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.