src/main/java/org/apache/sling/launchpad/webapp/integrationtest/GeneratedNodeNameTest.java [49:97]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void testTitle() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put("title", "Hello There");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "hello_there";
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testSlingPostNodeNameParam() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put(":name", "MyNodeName");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "MyNodeName";
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testSlingPostNodeNameHintParam() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put(":nameHint", "AnotherNodeName");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "AnotherNodeName".toLowerCase();
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testTitleWithSavePrefix() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put("./title", "Hello There 2");
        props.put("title", "not this one");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "hello_there_2";
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testCollision() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put("title", "Hello There");

        // posting twice with the same title must work, and return different locations
        final String locationA = testClient.createNode(postUrl, props);
        final String locationB = testClient.createNode(postUrl, props);

        assertFalse(
                "Locations A and B must be different (" + locationA + "," + locationB + ")",
                locationA.equals(locationB));
    }

    public void testNoParams() throws IOException {
        final String location = testClient.createNode(postUrl, null);
        assertTrue("Location end with a digit", Character.isDigit(location.charAt(location.length() - 1)));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/sling/launchpad/webapp/integrationtest/GeneratedNodeNameTestStar.java [36:84]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void testTitle() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put("title", "Hello There");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "hello_there";
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testSlingPostNodeNameParam() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put(":name", "MyNodeName");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "MyNodeName";
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testSlingPostNodeNameHintParam() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put(":nameHint", "AnotherNodeName");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "AnotherNodeName".toLowerCase();
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testTitleWithSavePrefix() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put("./title", "Hello There 2");
        props.put("title", "not this one");
        final String location = testClient.createNode(postUrl, props);
        final String expect = "hello_there_2";
        assertTrue("Location " + location + " ends with " + expect, location.endsWith(expect));
    }

    public void testCollision() throws IOException {
        final Map<String, String> props = new HashMap<String, String>();
        props.put("title", "Hello There");

        // posting twice with the same title must work, and return different locations
        final String locationA = testClient.createNode(postUrl, props);
        final String locationB = testClient.createNode(postUrl, props);

        assertFalse(
                "Locations A and B must be different (" + locationA + "," + locationB + ")",
                locationA.equals(locationB));
    }

    public void testNoParams() throws IOException {
        final String location = testClient.createNode(postUrl, null);
        assertTrue("Location end with a digit", Character.isDigit(location.charAt(location.length() - 1)));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



