use of alien4cloud.topology.task.InputArtifactTask in project alien4cloud by alien4cloud.
the class DeploymentSetupValidationStepDefinitions method thereShouldBeNoMissingArtifactsTasks.
@Then("^there should be no missing artifacts tasks$")
public void thereShouldBeNoMissingArtifactsTasks() throws Throwable {
TopologyValidationResult topologyValidationResult = JsonUtil.read(Context.getInstance().getRestResponse(), DeploymentTopologyDTO.class, Context.getJsonMapper()).getData().getValidation();
boolean missingFound = topologyValidationResult.getTaskList().stream().anyMatch(task -> task instanceof InputArtifactTask);
Assert.assertFalse(" Expected NO missing artifacts tasks for the deployment topology", missingFound);
}
use of alien4cloud.topology.task.InputArtifactTask in project alien4cloud by alien4cloud.
the class DeploymentSetupValidationStepDefinitions method theMissingInputsArtifactsShouldBe.
@And("^the missing inputs artifacts should be$")
public void theMissingInputsArtifactsShouldBe(DataTable expectedInputArtifactsTable) throws Throwable {
TopologyValidationResult topologyValidationResult = JsonUtil.read(Context.getInstance().getRestResponse(), DeploymentTopologyDTO.class, Context.getJsonMapper()).getData().getValidation();
for (List<String> expectedRow : expectedInputArtifactsTable.raw()) {
boolean missingFound = topologyValidationResult.getTaskList().stream().anyMatch(task -> task instanceof InputArtifactTask && ((InputArtifactTask) task).getInputArtifactName().equals(expectedRow.get(0)));
Assert.assertTrue(expectedRow.get(0) + " does not appear in the task list for the deployment topology", missingFound);
}
}
Aggregations