diff options
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.test')
6 files changed, 18 insertions, 20 deletions
diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java index 5f79397101f..2b1b46e22ed 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java @@ -230,7 +230,7 @@ public class OrcsBranchQueryTest { @Test public void zTestGetIncludeArchived() throws Exception { - IOseeBranch child = TokenFactory.createBranch(testName.getMethodName()); + IOseeBranch child = IOseeBranch.create(testName.getMethodName()); BranchQuery query = factory.branchQuery(); query.andIds(CIS_Bld_1); @@ -254,7 +254,7 @@ public class OrcsBranchQueryTest { @Test public void zTestGetIncludeDeleted() throws Exception { - IOseeBranch child = TokenFactory.createBranch(testName.getMethodName()); + IOseeBranch child = IOseeBranch.create(testName.getMethodName()); BranchQuery query = factory.branchQuery(); query.andIds(CIS_Bld_1); @@ -281,7 +281,7 @@ public class OrcsBranchQueryTest { @Test public void zTestGetWithMultipleConditions1() throws Exception { - IOseeBranch child = TokenFactory.createBranch(testName.getMethodName()); + IOseeBranch child = IOseeBranch.create(testName.getMethodName()); BranchId actual = createBranch(SAW_Bld_2, child); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java index badccd4f251..be2fa43c123 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java @@ -79,7 +79,7 @@ public class OrcsBranchTest { int CHANGED_TX_ID = 9; // Transaction containing tested change // set up the initial branch - IOseeBranch branch = TokenFactory.createBranch("PriorBranch"); + IOseeBranch branch = IOseeBranch.create("PriorBranch"); ArtifactId author = SystemUser.OseeSystem; @@ -105,7 +105,7 @@ public class OrcsBranchTest { // user Joe Smith, so if the code is correct, and the copy includes the final // transaction, then this will produce the same result as the query of the common branch // create the branch with the copied transaction - IOseeBranch postbranch = TokenFactory.createBranch("PostBranch"); + IOseeBranch postbranch = IOseeBranch.create("PostBranch"); TransactionId tx1 = TransactionId.valueOf(CHANGED_TX_ID); Callable<BranchReadable> postCallable = @@ -132,7 +132,7 @@ public class OrcsBranchTest { List<ChangeItem> priorItems = callable.call(); // create the branch with the copied transaction - IOseeBranch branch = TokenFactory.createBranch("CopiedBranch"); + IOseeBranch branch = IOseeBranch.create("CopiedBranch"); ArtifactId author = SystemUser.OseeSystem; @@ -151,7 +151,7 @@ public class OrcsBranchTest { public void testCommitBranchMissingArtifactsOnDestination() throws Exception { ArtifactId author = SystemUser.OseeSystem; // set up the initial branch - IOseeBranch branch = TokenFactory.createBranch("BaseBranch"); + IOseeBranch branch = IOseeBranch.create("BaseBranch"); Callable<BranchReadable> callableBranch = branchOps.createTopLevelBranch(branch, author); BranchReadable base = callableBranch.call(); @@ -162,7 +162,7 @@ public class OrcsBranchTest { // create working branch off of base to make some changes // set up the child branch - IOseeBranch branchName = TokenFactory.createBranch("ChildBranch"); + IOseeBranch branchName = IOseeBranch.create("ChildBranch"); Callable<BranchReadable> callableChildBranch = branchOps.createWorkingBranch(branchName, author, base, ArtifactId.SENTINEL); @@ -182,7 +182,7 @@ public class OrcsBranchTest { // create a disjoint working branch from common - IOseeBranch commonName = TokenFactory.createBranch("ChildFromCommonBranch"); + IOseeBranch commonName = IOseeBranch.create("ChildFromCommonBranch"); Callable<BranchReadable> callableBranchFromCommon = branchOps.createWorkingBranch(commonName, author, CoreBranches.COMMON, ArtifactId.SENTINEL); BranchReadable commonChildBranch = callableBranchFromCommon.call(); @@ -197,7 +197,7 @@ public class OrcsBranchTest { public void testBranchUpdateFields() throws Exception { String branchName = testName.getMethodName(); - IOseeBranch branch = TokenFactory.createBranch(branchName); + IOseeBranch branch = IOseeBranch.create(branchName); branchOps.createBaselineBranch(branch, SystemUser.OseeSystem, CoreBranches.SYSTEM_ROOT, SENTINEL).call(); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java index d2778b416ce..0ce0cd7c9df 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java @@ -123,7 +123,7 @@ public class OrcsPortingTest { private TransactionToken createBaselineBranchAndArtifacts() throws Exception { // set up the main branch - IOseeBranch branch = TokenFactory.createBranch("MainFromBranch"); + IOseeBranch branch = IOseeBranch.create("MainFromBranch"); branchApi.createTopLevelBranch(branch, author).call(); // baseline branch - set up artifacts on the main branch, and on the child branch @@ -151,7 +151,7 @@ public class OrcsPortingTest { private TransactionId createWorkingBranchChanges(IOseeBranch parentBranch, ArtifactId artifactToModify) throws Exception { // set up the child branch to copy to - IOseeBranch childBranch = TokenFactory.createBranch("childBranch"); + IOseeBranch childBranch = IOseeBranch.create("childBranch"); branchApi.createWorkingBranch(childBranch, author, parentBranch, ArtifactId.SENTINEL).call(); TransactionBuilder tx3 = txFactory.createTransaction(childBranch, author, "update second requirement"); @@ -184,7 +184,7 @@ public class OrcsPortingTest { private BranchId createCopyFromTransactionBranch(TransactionId transactionToCopy, ArtifactId assocaitedArt) throws Exception { // create the branch with the copied transaction - IOseeBranch branch = TokenFactory.createBranch(branchString); + IOseeBranch branch = IOseeBranch.create(branchString); // get the setup associated artifact - this is for a later test to make sure the branch is not duplicated // there should only be one port branch per associated artifact @@ -197,7 +197,7 @@ public class OrcsPortingTest { } private TransactionToken commitToDestinationBranch(BranchId copyTxBranch) throws Exception { - IOseeBranch destinationBranch = TokenFactory.createBranch("IndepToBranch"); + IOseeBranch destinationBranch = IOseeBranch.create("IndepToBranch"); branchApi.createTopLevelBranch(destinationBranch, author).call(); return branchApi.commitBranch(author, copyTxBranch, destinationBranch).call(); } diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java index 635383c62f0..f1555384396 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java @@ -546,7 +546,7 @@ public class OrcsQueryTest { } private BranchReadable setupNameEqualsArtifacts() throws Exception { - IOseeBranch branchToken = TokenFactory.createBranch("TestAndNameEquals"); + IOseeBranch branchToken = IOseeBranch.create("TestAndNameEquals"); BranchReadable branch = branchApi.createTopLevelBranch(branchToken, author).call(); TransactionBuilder tx = txFactory.createTransaction(branch, author, "add folders"); tx.createArtifact(CoreArtifactTypes.Folder, "First Folder"); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java index 4f3a63798ba..e72485589c3 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java @@ -220,7 +220,7 @@ public class OrcsTransactionTest { assertEquals(SystemUser.Anonymous.getName(), userDup.getName()); // duplicate on different branch - IOseeBranch branchToken = TokenFactory.createBranch("DuplicateArtifact tests"); + IOseeBranch branchToken = IOseeBranch.create("DuplicateArtifact tests"); Callable<BranchReadable> callableBranch = orcsBranch.createTopLevelBranch(branchToken, userArtifact); BranchReadable topLevelBranch = callableBranch.call(); @@ -239,7 +239,7 @@ public class OrcsTransactionTest { public void testIntroduceArtifact() throws Exception { ArtifactReadable user = query.fromBranch(COMMON).andIds(SystemUser.Anonymous).getResults().getExactlyOne(); - IOseeBranch branchToken = TokenFactory.createBranch("IntroduceArtifact tests"); + IOseeBranch branchToken = IOseeBranch.create("IntroduceArtifact tests"); BranchReadable topLevelBranch = orcsBranch.createTopLevelBranch(branchToken, userArtifact).call(); TransactionBuilder transaction = diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTupleTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTupleTest.java index df67b6d9835..80875d8d4a2 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTupleTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTupleTest.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.function.BiConsumer; import org.eclipse.osee.framework.core.data.ApplicabilityToken; import org.eclipse.osee.framework.core.data.ArtifactId; -import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.data.TupleTypeId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreTupleTypes; @@ -128,8 +127,7 @@ public class OrcsTupleTest { BiConsumer<Long, String> consumer = (id, name) -> result.add(new ApplicabilityToken(id, name)); orcsApi.getQueryFactory().tupleQuery().getTuple2KeyValuePair(CoreTupleTypes.ViewApplicability, - ArtifactId.valueOf(branchViewArts.getList().get(0).getId()), - TokenFactory.createBranch(DemoBranches.SAW_Bld_1.getId()), consumer); + ArtifactId.valueOf(branchViewArts.getList().get(0).getId()), DemoBranches.SAW_Bld_1, consumer); Assert.assertEquals(5, result.size()); } |