Search in sources :

Example 6 with ImportResponse

use of com.b2international.snowowl.core.request.io.ImportResponse in project snow-owl by b2ihealthcare.

the class SnomedImportRowValidatorTest method importReferenceSetWithNonUUID.

@Test
public void importReferenceSetWithNonUUID() throws FileNotFoundException {
    final String archiveFilePath = "SnomedCT_RF2Release_INT_20180223_member_with_non_uuid.zip";
    final ImportResponse response = importArchive(archiveFilePath, Rf2ReleaseType.DELTA);
    final Collection<String> issues = getDefectMessages(response);
    final String issue = Iterables.getOnlyElement(issues);
    assertThat(issues).hasSize(1);
    assertThat(issue).containsSequence(Rf2ValidationDefects.INVALID_UUID.getLabel());
    assertFalse(response.isSuccess());
}
Also used : ImportResponse(com.b2international.snowowl.core.request.io.ImportResponse) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Example 7 with ImportResponse

use of com.b2international.snowowl.core.request.io.ImportResponse in project snow-owl by b2ihealthcare.

the class SnomedImportRowValidatorTest method importConceptWithDescriptionAsDefStatusId.

@Test
public void importConceptWithDescriptionAsDefStatusId() throws FileNotFoundException {
    final String archiveFilePath = "SnomedCT_Release_INT_20150131_concept_with_desc_as_defStatusId.zip";
    final ImportResponse response = importArchive(archiveFilePath, Rf2ReleaseType.DELTA);
    final Collection<String> issues = getDefectMessages(response);
    assertThat(issues).hasSize(1);
    assertEquals(Rf2ValidationDefects.UNEXPECTED_COMPONENT_CATEGORY.getLabel(), Iterables.getOnlyElement(issues));
    assertFalse(response.isSuccess());
}
Also used : ImportResponse(com.b2international.snowowl.core.request.io.ImportResponse) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Aggregations

ImportResponse (com.b2international.snowowl.core.request.io.ImportResponse)7 AbstractSnomedApiTest (com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)6 Test (org.junit.Test)6 ApiError (com.b2international.commons.exceptions.ApiError)1 SnomedRf2ImportConfiguration (com.b2international.snowowl.snomed.core.rest.domain.SnomedRf2ImportConfiguration)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1