Search in sources :

Example 46 with IBranchPath

use of com.b2international.snowowl.core.api.IBranchPath in project snow-owl by b2ihealthcare.

the class SnomedBranchingApiTest method createChildBranchWithMetadata.

@Test
public void createChildBranchWithMetadata() {
    IBranchPath a = BranchPathUtils.createPath(branchPath, "a");
    branching.createBranch(a, ImmutableMap.of("key", "value")).statusCode(201);
    branching.getBranch(a).statusCode(200).body("metadata.key", equalTo("value"));
}
Also used : IBranchPath(com.b2international.snowowl.core.api.IBranchPath) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Example 47 with IBranchPath

use of com.b2international.snowowl.core.api.IBranchPath in project snow-owl by b2ihealthcare.

the class SnomedBranchingApiTest method createChildBranch.

@Test
public void createChildBranch() {
    IBranchPath a = BranchPathUtils.createPath(branchPath, "a");
    branching.createBranch(a).statusCode(201);
    branching.getBranch(a).statusCode(200);
}
Also used : IBranchPath(com.b2international.snowowl.core.api.IBranchPath) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Example 48 with IBranchPath

use of com.b2international.snowowl.core.api.IBranchPath in project snow-owl by b2ihealthcare.

the class SnomedBranchingApiTest method getChildren.

@Test
public void getChildren() {
    IBranchPath a = createPath(branchPath, "a");
    IBranchPath b = createPath(a, "b");
    branching.createBranchRecursively(b);
    branching.getAllBranches().statusCode(200).body("items.name", hasItem(a.lastSegment())).body("items.name", hasItem(b.lastSegment()));
    branching.getBranchChildren(branchPath).statusCode(200).body("items.name", hasItem(a.lastSegment())).body("items.name", hasItem(b.lastSegment()));
}
Also used : IBranchPath(com.b2international.snowowl.core.api.IBranchPath) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Example 49 with IBranchPath

use of com.b2international.snowowl.core.api.IBranchPath in project snow-owl by b2ihealthcare.

the class SnomedBranchingApiTest method deleteBranchRecursively.

@Test
public void deleteBranchRecursively() {
    IBranchPath a = createPath(branchPath, "a");
    IBranchPath b = createPath(a, "b");
    branching.createBranchRecursively(b);
    branching.getBranch(b).statusCode(200);
    branching.getBranch(a).statusCode(200);
    branching.deleteBranch(a).statusCode(204);
    branching.getBranch(a).statusCode(200).body("deleted", equalTo(true));
    branching.getBranch(b).statusCode(200).body("deleted", equalTo(true));
}
Also used : IBranchPath(com.b2international.snowowl.core.api.IBranchPath) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Example 50 with IBranchPath

use of com.b2international.snowowl.core.api.IBranchPath in project snow-owl by b2ihealthcare.

the class SnomedBranchingApiTest method deleteChildBranch.

@Test
public void deleteChildBranch() {
    IBranchPath a = BranchPathUtils.createPath(branchPath, "a");
    branching.createBranch(a).statusCode(201);
    branching.deleteBranch(a).statusCode(204);
    branching.getBranch(a).statusCode(200).body("deleted", equalTo(true));
}
Also used : IBranchPath(com.b2international.snowowl.core.api.IBranchPath) Test(org.junit.Test) AbstractSnomedApiTest(com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)

Aggregations

IBranchPath (com.b2international.snowowl.core.api.IBranchPath)79 Test (org.junit.Test)73 AbstractSnomedApiTest (com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest)70 Merge (com.b2international.snowowl.core.merge.Merge)10 MergeConflict (com.b2international.snowowl.core.merge.MergeConflict)10 SnomedConcept (com.b2international.snowowl.snomed.core.domain.SnomedConcept)8 ConflictingAttribute (com.b2international.snowowl.core.merge.ConflictingAttribute)6 LocalDate (java.time.LocalDate)5 Pair (com.b2international.commons.Pair)4 File (java.io.File)4 Ignore (org.junit.Ignore)2 BackwardListIterator (com.b2international.commons.collections.BackwardListIterator)1 Json (com.b2international.commons.json.Json)1 BaseRevisionBranching (com.b2international.index.revision.BaseRevisionBranching)1 RevisionBranch (com.b2international.index.revision.RevisionBranch)1 ComponentIdentifier (com.b2international.snowowl.core.ComponentIdentifier)1 Repository (com.b2international.snowowl.core.Repository)1 RepositoryManager (com.b2international.snowowl.core.RepositoryManager)1 ResourceURI (com.b2international.snowowl.core.ResourceURI)1 BranchCompareResult (com.b2international.snowowl.core.branch.compare.BranchCompareResult)1