use of com.b2international.snowowl.core.validation.whitelist.ValidationWhiteLists in project snow-owl by b2ihealthcare.
the class ValidationWhiteListApiTest method filterByRuleId.
@Test
public void filterByRuleId() throws Exception {
createWhiteLists("3", COMPONENT_ID);
createWhiteLists("4", COMPONENT_ID);
final ValidationWhiteLists whiteLists = ValidationRequests.whiteList().prepareSearch().filterByRuleId("3").buildAsync().getRequest().execute(context);
assertThat(whiteLists).hasSize(1);
assertThat(whiteLists.first().get().getRuleId()).isEqualTo("3");
}
use of com.b2international.snowowl.core.validation.whitelist.ValidationWhiteLists in project snow-owl by b2ihealthcare.
the class ValidationWhiteListApiTest method deleteWhiteList.
@Test
public void deleteWhiteList() throws Exception {
final String whiteList1 = createWhiteLists("1", COMPONENT_ID);
final String whiteList2 = createWhiteLists("2", COMPONENT_ID);
ValidationRequests.whiteList().prepareDelete(whiteList2).buildAsync().getRequest().execute(context);
final ValidationWhiteLists WhiteLists = getWhiteLists();
assertThat(WhiteLists.stream().map(ValidationWhiteList::getId).collect(Collectors.toList())).doesNotContain(whiteList2);
assertThat(WhiteLists.getItems().size()).isEqualTo(1);
}
use of com.b2international.snowowl.core.validation.whitelist.ValidationWhiteLists in project snow-owl by b2ihealthcare.
the class ValidationWhiteListApiTest method getAllValidationWhiteLists.
@Test
public void getAllValidationWhiteLists() throws Exception {
final ValidationWhiteLists validationWhiteLists = getWhiteLists();
assertThat(validationWhiteLists).isEmpty();
}
use of com.b2international.snowowl.core.validation.whitelist.ValidationWhiteLists in project snow-owl by b2ihealthcare.
the class ValidationWhiteListApiTest method filterByComponentIdentifier.
@Test
public void filterByComponentIdentifier() throws Exception {
final ComponentIdentifier componentIdentifier = ComponentIdentifier.of("concept", "12345678");
createWhiteLists("5", COMPONENT_ID);
createWhiteLists("6", componentIdentifier);
final ValidationWhiteLists whiteLists = ValidationRequests.whiteList().prepareSearch().filterByComponentIdentifier(componentIdentifier.getComponentId()).filterByComponentType(componentIdentifier.getComponentType()).buildAsync().getRequest().execute(context);
assertThat(whiteLists).hasSize(1);
assertThat(whiteLists.first().get().getComponentIdentifier().getComponentId()).isEqualTo(componentIdentifier.getComponentId());
}
Aggregations