Package org.amdatu.web.resourcehandler.util.ResourceKeyParser

Examples of org.amdatu.web.resourcehandler.util.ResourceKeyParser.Entry


* Test cases for RegisterItem.
*/
public class EntryTest extends TestCase {

    public void testCreateRegisterItemWithAliasAndPathOnlyOk() throws Exception {
        Entry item = new Entry("alias  ;path  ");
        assertNotNull(item);

        assertEquals("/alias", item.m_alias);
        assertEquals("/path", item.m_path);
        assertEquals("", item.m_contextId);
View Full Code Here


        assertEquals("/path", item.m_path);
        assertEquals("", item.m_contextId);
    }

    public void testCreateRegisterItemWithAliasOnlyOk() throws Exception {
        Entry item = new Entry("alias  ");
        assertNotNull(item);

        assertEquals("/alias", item.m_alias);
        assertEquals("/alias", item.m_path);
        assertEquals("", item.m_contextId);
View Full Code Here

        assertEquals("/alias", item.m_path);
        assertEquals("", item.m_contextId);
    }

    public void testCreateRegisterItemWithAliasPathAndContextIdOk() throws Exception {
        Entry item = new Entry("alias;/path;contextId");
        assertNotNull(item);

        assertEquals("/alias", item.m_alias);
        assertEquals("/path", item.m_path);
        assertEquals("contextId", item.m_contextId);
View Full Code Here

        assertEquals("contextId", item.m_contextId);
    }

    public void testCreateRegisterItemWithEmptyAliasFail() throws Exception {
        try {
            new Entry(";b;c");
            fail("InvalidEntryException expected!");
        }
        catch (InvalidEntryException e) {
            // Ok; expected...
        }
View Full Code Here

            // Ok; expected...
        }
    }

    public void testCreateRegisterItemWithEmptyContextIdOk() throws Exception {
        Entry item = new Entry("alias;path;");
        assertNotNull(item);

        assertEquals("/alias", item.m_alias);
        assertEquals("/path", item.m_path);
        assertEquals("", item.m_contextId);
View Full Code Here

        assertEquals("", item.m_contextId);
    }

    public void testCreateRegisterItemWithEmptyPathFail() throws Exception {
        try {
            new Entry("a; ;c");
            fail("InvalidEntryException expected!");
        }
        catch (InvalidEntryException e) {
            // Ok; expected...
        }
View Full Code Here

        }
    }

    public void testCreateRegisterItemWithFourArgsFail() throws Exception {
        try {
            new Entry("a;b;c;d");
            fail("InvalidEntryException expected!");
        }
        catch (InvalidEntryException e) {
            // Ok; expected...
        }
View Full Code Here

        }
    }

    public void testCreateRegisterItemWithNullAliasFail() throws Exception {
        try {
            new Entry(";b;c");
            fail("InvalidEntryException expected!");
        }
        catch (InvalidEntryException e) {
            // Ok; expected...
        }
View Full Code Here

        }
    }

    public void testCreateRegisterItemWithNullArgsFail() throws Exception {
        try {
            new Entry(null);
            fail("InvalidEntryException expected!");
        }
        catch (InvalidEntryException e) {
            // Ok; expected...
        }
View Full Code Here

        }
    }

    public void testCreateRegisterItemWithNullPathFail() throws Exception {
        try {
            new Entry("a;;c");
            fail("InvalidEntryException expected!");
        }
        catch (InvalidEntryException e) {
            // Ok; expected...
        }
View Full Code Here

TOP

Related Classes of org.amdatu.web.resourcehandler.util.ResourceKeyParser.Entry

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.