use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class KameletBindingSecretSteps method klb_has_a_path_matching_value.
@And("the klb secret has an entry at path {string} with value {int}")
public void klb_has_a_path_matching_value(String path, int value) {
Secret secret = secret();
assertThat(secret).isNotNull();
assertThatJson(JacksonUtil.asJsonNode(secret)).inPath(path).isNumber().isEqualTo(value);
}
use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class KameletBindingSteps method klb_has_a_path_matching_value.
@And("the klb has an entry at path {string} with value {bool}")
public void klb_has_a_path_matching_value(String path, Boolean value) {
KameletBinding res = klb();
assertThat(res).isNotNull();
assertThatJson(JacksonUtil.asJsonNode(res)).inPath(path).isBoolean().isEqualTo(value);
}
use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class KameletBindingSteps method klb_has_a_path_containing_object.
@And("the klb has an array at path {string} containing:")
public void klb_has_a_path_containing_object(String path, DataTable elements) {
KameletBinding res = klb();
assertThat(res).isNotNull();
assertThatJson(JacksonUtil.asJsonNode(res)).inPath(path).isArray().containsAll(elements.asList().stream().map(e -> ctx.resolvePlaceholders(e)).map(e -> Serialization.unmarshal(e, JsonNode.class)).collect(Collectors.toList()));
}
use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class KameletBindingSteps method klb_annotation_contains.
@And("the klb has annotations containing:")
public void klb_annotation_contains(DataTable table) {
KameletBinding res = klb();
assertThat(res).isNotNull();
assertThatDataTable(table, ctx::resolvePlaceholders).matches(res.getMetadata().getAnnotations());
}
use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class KameletBindingSteps method klb_label_contains.
@And("the klb has labels containing:")
public void klb_label_contains(DataTable table) {
KameletBinding res = klb();
assertThat(res).isNotNull();
assertThatDataTable(table, ctx::resolvePlaceholders).matches(res.getMetadata().getLabels());
}
Aggregations