Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-06-14 19:28:09 -0400
committerAngel Avila2016-06-14 19:28:09 -0400
commitc06df82d61e0fbaba865fc82413a3981d664d0e0 (patch)
tree8f983e45b7423f3834d1154027b64bf17a587c9a /plugins/org.eclipse.osee.orcs.db.test
parenteb4bf3bf6d8cad58dad30c359741d15bbaef65d8 (diff)
downloadorg.eclipse.osee-c06df82d61e0fbaba865fc82413a3981d664d0e0.tar.gz
org.eclipse.osee-c06df82d61e0fbaba865fc82413a3981d664d0e0.tar.xz
org.eclipse.osee-c06df82d61e0fbaba865fc82413a3981d664d0e0.zip
refactor: Remove unnecessary usage of TransactionReadable
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db.test')
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/TxQuerySqlContextFactoryImplTest.java12
2 files changed, 8 insertions, 10 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
index 3f37f89e860..77059ee4d89 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.executor.admin.HasCancellation;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
+import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.change.ChangeItem;
import org.eclipse.osee.framework.core.model.change.ChangeItemUtil;
@@ -36,7 +37,6 @@ import org.eclipse.osee.orcs.core.ds.LoadDataHandler;
import org.eclipse.osee.orcs.core.ds.OrcsData;
import org.eclipse.osee.orcs.core.ds.RelationData;
import org.eclipse.osee.orcs.core.ds.VersionData;
-import org.eclipse.osee.orcs.data.TransactionReadable;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -60,8 +60,8 @@ public class MissingChangeItemFactoryTest {
@Mock private DataLoader destDataLoader;
@Mock private Long sourceBranch;
@Mock private Long destBranch;
- @Mock private TransactionReadable sourceTx;
- @Mock private TransactionReadable destTx;
+ @Mock private TransactionToken sourceTx;
+ @Mock private TransactionToken destTx;
@Mock private OrcsSession session;
@Mock private HasCancellation cancellation;
// @formatter:on
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/TxQuerySqlContextFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/TxQuerySqlContextFactoryImplTest.java
index 3df265db5db..dc94404d302 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/TxQuerySqlContextFactoryImplTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/TxQuerySqlContextFactoryImplTest.java
@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.GUID;
@@ -281,7 +282,8 @@ public class TxQuerySqlContextFactoryImplTest {
"txd1.transaction_id = (SELECT max(td2.transaction_id) FROM osee_tx_details td1,osee_tx_details td2 WHERE td1.transaction_id = ? AND td1.branch_id = td2.branch_id AND td1.transaction_id > td2.transaction_id)\n" + //
" ORDER BY txd1.transaction_id";
- queryData.addCriteria(prior(3));
+ TransactionId tx = TransactionId.valueOf(3);
+ queryData.addCriteria(new CriteriaTxGetPrior(tx));
QuerySqlContext context = queryEngine.createQueryContext(session, queryData);
@@ -293,7 +295,7 @@ public class TxQuerySqlContextFactoryImplTest {
assertEquals(0, joins.size());
Iterator<Object> iterator = parameters.iterator();
- assertEquals(3, iterator.next());
+ assertEquals(tx, iterator.next());
}
private static Criteria id(Integer... values) {
@@ -327,8 +329,4 @@ public class TxQuerySqlContextFactoryImplTest {
private static Criteria byCommitId(Collection<Integer> ids) {
return new CriteriaCommitIds(ids);
}
-
- private static Criteria prior(Integer value) {
- return new CriteriaTxGetPrior(value);
- }
-}
+} \ No newline at end of file

Back to the top