public void verifyEncodedRead() throws IOException, DocumentException { String path = "src/test/verifiers/dom4j/expected-encoding.xml"; Reader reader = ReaderFactory.newXmlReader(new File(path)); MavenDom4jReader modelReader = new MavenDom4jReader(); Model model = modelReader.read(reader); Assert.assertEquals("Maven\u00A9", model.getName()); }
public void assertModel(Model expected, Model actual) { Assert.assertNotNull("Actual model", actual); Assert.assertEquals("/model/extend", expected.getExtend(), actual.getExtend()); // assertParent( expected.getParent(), actual.getParent() ); Assert.assertEquals( "/model/modelVersion", expected.getModelVersion(), actual.getModelVersion()); Assert.assertEquals("/model/groupId", expected.getGroupId(), actual.getGroupId()); Assert.assertEquals("/model/artifactId", expected.getArtifactId(), actual.getArtifactId()); Assert.assertEquals("/model/type", expected.getType(), actual.getType()); Assert.assertEquals("/model/name", expected.getName(), actual.getName()); Assert.assertEquals("/model/version", expected.getVersion(), actual.getVersion()); Assert.assertEquals( "/model/shortDescription", expected.getShortDescription(), actual.getShortDescription()); Assert.assertEquals("/model/description", expected.getDescription(), actual.getDescription()); Assert.assertEquals("/model/url", expected.getUrl(), actual.getUrl()); Assert.assertEquals("/model/logo", expected.getLogo(), actual.getLogo()); // assertIssueManagement(); // assertCiManagement(); Assert.assertEquals( "/model/inceptionYear", expected.getInceptionYear(), actual.getInceptionYear()); // assertEquals( "/model/siteAddress", expected.getSiteAddress(), actual.getSiteAddress() // ); // assertEquals( "/model/siteDirectory", expected.getSiteDirectory(), // actual.getSiteDirectory() ); // assertEquals( "/model/distributionSite", expected.getDistributionSite(), // actual.getDistributionSite() ); // assertEquals( "/model/distributionDirectory", expected.getDistributionDirectory(), // actual.getDistributionDirectory() ); assertMailingLists(expected.getMailingLists(), actual.getMailingLists()); /* assertDevelopers( ); assertContributors( ); assertDependencies( ); assertLicenses( ); assertPackageGroups( ); assertReports( ); */ assertScm(expected.getScm(), actual.getScm()); /* assertBuild( ); assertOrganization( expected.getOrganization(), actual.getOrganization() ); */ assertBuild(expected.getBuild(), actual.getBuild()); }