use of com.b2international.snowowl.core.ResourceURI in project snow-owl by b2ihealthcare.
the class SnomedExtensionUpgradeTest method upgrade01Nochanges.
@Test
public void upgrade01Nochanges() {
// create extension on the latest SI VERSION
CodeSystem extension = createExtension(latestInternationalVersion, branchPath.lastSegment());
// create a new INT version without any changes
LocalDate effectiveTime = getNextAvailableEffectiveDate(SNOMEDCT);
createVersion(SNOMEDCT, effectiveTime).statusCode(201);
// start upgrade
final ResourceURI newExtensionOf = CodeSystem.uri(SNOMEDCT, effectiveTime.toString());
CodeSystem upgradeCodeSystem = createExtensionUpgrade(extension.getResourceURI(), newExtensionOf);
assertEquals(newExtensionOf, upgradeCodeSystem.getExtensionOf());
}
use of com.b2international.snowowl.core.ResourceURI in project snow-owl by b2ihealthcare.
the class SnomedExtensionUpgradeTest method upgrade03NewInternationalConceptOnly.
@Test
public void upgrade03NewInternationalConceptOnly() {
// create extension on the latest SI VERSION
CodeSystem extension = createExtension(latestInternationalVersion, branchPath.lastSegment());
// new SI concept
String newConceptId = createConcept(SnomedContentRule.SNOMEDCT, createConceptRequestBody(Concepts.ROOT_CONCEPT, Concepts.MODULE_SCT_CORE));
// create a new INT version
LocalDate effectiveTime = getNextAvailableEffectiveDate(SNOMEDCT);
createVersion(SNOMEDCT, effectiveTime).statusCode(201);
ResourceURI upgradeVersion = CodeSystem.uri(SNOMEDCT, effectiveTime.toString());
// start upgrade to the new available upgrade version
CodeSystem upgradeCodeSystem = createExtensionUpgrade(extension.getResourceURI(), upgradeVersion);
assertEquals(upgradeVersion, upgradeCodeSystem.getExtensionOf());
getComponent(upgradeCodeSystem.getResourceURI(), SnomedComponentType.CONCEPT, newConceptId).statusCode(200);
}
use of com.b2international.snowowl.core.ResourceURI in project snow-owl by b2ihealthcare.
the class CodeSystemTest method extensionCodeSystemChildBranchToURI.
@Test
public void extensionCodeSystemChildBranchToURI() throws Exception {
codeSystem.setId("SNOMEDCT-UK");
codeSystem.setBranchPath("MAIN/SNOMEDCT-UK");
ResourceURI uri = codeSystem.getResourceURI("MAIN/SNOMEDCT-UK/child");
assertThat(uri).isEqualTo(CodeSystem.uri("SNOMEDCT-UK/child"));
}
use of com.b2international.snowowl.core.ResourceURI in project snow-owl by b2ihealthcare.
the class ResourceURITest method explicitVersion.
@Test
public void explicitVersion() throws Exception {
final ResourceURI uri = CodeSystem.uri("SNOMEDCT/2019-07-31");
assertEquals("SNOMEDCT", uri.getResourceId());
assertEquals("2019-07-31", uri.getPath());
}
use of com.b2international.snowowl.core.ResourceURI in project snow-owl by b2ihealthcare.
the class ResourceURITest method latestReleasedExplicit.
@Test
public void latestReleasedExplicit() throws Exception {
final ResourceURI uri = CodeSystem.uri("SNOMEDCT/LATEST");
assertEquals("SNOMEDCT", uri.getResourceId());
assertEquals(ResourceURI.LATEST, uri.getPath());
}
Aggregations