@Test public void createDomainBundleProjectFoldersGeneratorTest() { DefaultProjectInformation defaultProjectInformation = mock(DefaultProjectInformation.class); when(defaultProjectInformation.getGroupId()).thenReturn("group.id"); when(defaultProjectInformation.getArtifactId()).thenReturn("artifact-id"); when(defaultProjectInformation.getPackaging()).thenReturn("mule-application"); assertThat("The project folder generator type is not the expected", ProjectFoldersGeneratorFactory.create(defaultProjectInformation), instanceOf(MuleProjectFoldersGenerator.class)); }
public static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation) { String groupId = projectInformation.getGroupId(); String artifactId = projectInformation.getArtifactId(); PackagingType packagingType = PackagingType.fromString(projectInformation.getPackaging()); if (packagingType.equals(PackagingType.MULE_DOMAIN_BUNDLE)) { return new DomainBundleProjectFoldersGenerator(groupId, artifactId, packagingType); } return new MuleProjectFoldersGenerator(groupId, artifactId, packagingType); }
ProjectFoldersGeneratorFactory { public static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation) { String groupId = projectInformation.getGroupId(); String artifactId = projectInformation.getArtifactId(); PackagingType packagingType = PackagingType.fromString(projectInformation.getPackaging()); if (packagingType.equals(PackagingType.MULE_DOMAIN_BUNDLE)) { return new DomainBundleProjectFoldersGenerator(groupId, artifactId, packagingType); } return new MuleProjectFoldersGenerator(groupId, artifactId, packagingType); } }
ProjectFoldersGeneratorFactory { public static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation) { String groupId = projectInformation.getGroupId(); String artifactId = projectInformation.getArtifactId(); PackagingType packagingType = PackagingType.fromString(projectInformation.getPackaging()); if (packagingType.equals(PackagingType.MULE_DOMAIN_BUNDLE)) { return new DomainBundleProjectFoldersGenerator(groupId, artifactId, packagingType); } return new MuleProjectFoldersGenerator(groupId, artifactId, packagingType); }  }
ProjectFoldersGeneratorFactory { public static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation) { String groupId = projectInformation.getGroupId(); String artifactId = projectInformation.getArtifactId(); PackagingType packagingType = PackagingType.fromString(projectInformation.getPackaging()); if (packagingType.equals(PackagingType.MULE_DOMAIN_BUNDLE)) { return new DomainBundleProjectFoldersGenerator(groupId, artifactId, packagingType); } return new MuleProjectFoldersGenerator(groupId, artifactId, packagingType); }  static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation); }
ProjectFoldersGeneratorFactory { public static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation) { String groupId = projectInformation.getGroupId(); String artifactId = projectInformation.getArtifactId(); PackagingType packagingType = PackagingType.fromString(projectInformation.getPackaging()); if (packagingType.equals(PackagingType.MULE_DOMAIN_BUNDLE)) { return new DomainBundleProjectFoldersGenerator(groupId, artifactId, packagingType); } return new MuleProjectFoldersGenerator(groupId, artifactId, packagingType); }  static AbstractProjectFoldersGenerator create(ProjectInformation projectInformation);  }