use of org.finos.legend.sdlc.server.project.maven.MultiModuleMavenProjectStructure in project legend-sdlc by finos.
the class TestMultiModuleMavenProjectStructure method testModuleNames.
protected void testModuleNames(ProjectType projectType) {
MultiModuleMavenProjectStructure projectStructure = buildProjectStructure(projectType);
Assert.assertTrue(projectStructure.getEntitiesModuleName(), MultiModuleMavenProjectStructure.isValidModuleName(projectStructure.getEntitiesModuleName()));
Assert.assertEquals(1, projectStructure.getArtifactIdsForType(ArtifactType.entities).count());
Assert.assertEquals(1, projectStructure.getArtifactIdsForType(ArtifactType.versioned_entities).count());
Assert.assertEquals(projectStructure.getModuleFullName(projectStructure.getEntitiesModuleName()), projectStructure.getArtifactIdsForType(ArtifactType.entities).findFirst().get());
// TODO what about the versioned-entities module name?
Assert.assertEquals("invalid other module names", Collections.emptyList(), projectStructure.getOtherModulesNames().stream().filter(mn -> !MultiModuleMavenProjectStructure.isValidModuleName(mn)).collect(Collectors.toList()));
}
Aggregations