use of io.fabric8.deployer.dto.DeployResults in project fabric8 by jboss-fuse.
the class DeployToProfileMojoTest method before.
// Fixtures setup
@Before
public void before() {
mojo.fabricServer = mock(Server.class);
project = new MavenProject();
project.setGroupId("io.fabric8");
project.setArtifactId("artifact");
project.setVersion(FABRIC_VERSION);
mojo.project = project;
deployResults = new DeployResults();
deployResults.setProfileId("profileId");
deployResults.setVersionId("versionId");
}
use of io.fabric8.deployer.dto.DeployResults in project fabric8 by jboss-fuse.
the class DeployToProfileMojoTest method shouldExpandProjectGroupIdPlaceholder.
// Tests
@Test
public void shouldExpandProjectGroupIdPlaceholder() throws IOException, J4pException, MalformedObjectNameException, MojoExecutionException {
// Given
File config = new File(root, randomUUID().toString());
String property = "groupId = " + PLACEHOLDER_PROJECT_GROUP_ID;
writeToFile(config, property.getBytes());
// When
mojo.uploadProfileConfigFile(jolokiaClient, deployResults, root, config);
String decodedConfig = decodeSentConfig();
// Then
String expectedConfig = "groupId = " + project.getGroupId();
assertEquals(expectedConfig, decodedConfig);
}
Aggregations