Logo Search packages:      
Sourcecode: maven-repo-helper version File versions

void org::debian::maven::repo::POMCleanerTest::testCleanModelloPom (  )  throws Exception [inline]

Test of cleanPom method, of class POMCleaner.

Definition at line 56 of file POMCleanerTest.java.

References org::debian::maven::repo::POMTransformer::addDefaultRules(), and org::debian::maven::repo::POMCleaner::cleanPom().

                                                       {
        pomProperties = new File(testDir, "pom.properties");
        usePom("modello-core.xml");
        boolean noParent = false;
        POMCleaner instance = new POMCleaner();
        instance.addDefaultRules();
        instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libmodello-java");
        assertXMLEqual(read("modello-core.cleaned"), read(updatedPom));
        Properties pomInfo = new Properties();
        pomInfo.load(new FileInputStream(pomProperties));
        assertEquals("org.codehaus.modello", pomInfo.get("groupId"));
        assertEquals("modello-core", pomInfo.get("artifactId"));
        assertEquals("jar", pomInfo.get("type"));
        assertEquals("1.0-alpha-22", pomInfo.get("version"));
        assertEquals("debian", pomInfo.get("debianVersion"));

        instance.cleanPom(pom, updatedPom, pomProperties, noParent, true, null, "libmodello-java");
        assertXMLEqual(read("modello-core.keep.cleaned"), read(updatedPom));
        pomInfo = new Properties();
        pomInfo.load(new FileInputStream(pomProperties));
        assertEquals("org.codehaus.modello", pomInfo.get("groupId"));
        assertEquals("modello-core", pomInfo.get("artifactId"));
        assertEquals("jar", pomInfo.get("type"));
        assertEquals("1.0-alpha-22", pomInfo.get("version"));
        assertEquals("debian", pomInfo.get("debianVersion"));

    }


Generated by  Doxygen 1.6.0   Back to index