Package com.alibaba.citrus.service.pull.impl.PullServiceImpl

Examples of com.alibaba.citrus.service.pull.impl.PullServiceImpl.ToolName


public class ToolNameTests {
    @Test
    public void names() {
        try {
            new ToolName(null, "  ", false);
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, exception("tool name"));
        }

        assertToolName("/test", "test", new ToolName(null, " test ", false));
        assertToolName("/test.1", "test.1", new ToolName(null, " test.1 ", false));
        assertToolName("/test/xxx", "test/xxx", new ToolName("  ", " test/xxx ", false));

        assertToolName("/prefix/test", "test", new ToolName(" prefix ", " test ", false));
        assertToolName("/prefix/test.1", "test.1", new ToolName(" prefix ", " test.1 ", false));
        assertToolName("/prefix/test/xxx", "test/xxx", new ToolName("prefix", " test/xxx ", false));

        assertToolName("/prefix/test", "test", new ToolName(" prefix ", " /test ", true));
        assertToolName("/prefix/test.1", "test.1", new ToolName(null, " /prefix/test.1 ", true));
        assertToolName("/prefix/test/xxx", "xxx", new ToolName("/prefix", " test/xxx ", true));
    }
View Full Code Here


    }

    @Test
    public void hashCodeEquals() {
        Set<ToolName> tools = createHashSet();
        ToolName t1;
        ToolName t2;

        t1 = new ToolName(null, " test ", false);
        t2 = new ToolName(null, "test", false);
        tools.clear();
        tools.add(t1);
        assertTrue(tools.contains(t2));
        assertEquals(0, t1.compareTo(t2));

        t1 = new ToolName(null, "prefix/test/xxx", true);
        t2 = new ToolName("prefix/test", "xxx", false);
        tools.clear();
        tools.add(t1);
        assertTrue(tools.contains(t2));
        assertEquals(0, t1.compareTo(t2));
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.pull.impl.PullServiceImpl.ToolName

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.