Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-06-13 23:28:15 -0400
committerRyan D. Brooks2011-06-13 23:28:15 -0400
commit601abff52a3bcbacbe62e370510930d36bf2c2e4 (patch)
treea6eb07feedb525446f218d1e8b9ac8a065b6887e /plugins/org.eclipse.osee.framework.skynet.core.test
parent620c514899a2fe277768e78dfff48752edbeb840 (diff)
downloadorg.eclipse.osee-601abff52a3bcbacbe62e370510930d36bf2c2e4.tar.gz
org.eclipse.osee-601abff52a3bcbacbe62e370510930d36bf2c2e4.tar.xz
org.eclipse.osee-601abff52a3bcbacbe62e370510930d36bf2c2e4.zip
refactor: Convert all persist and transactions to have comments
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core.test')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/UserManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQueryTest.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPurgeTest.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_getLastModified.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_setAttributeValues.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/AttributePurgeTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchPurgeTest.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchStateTest.java16
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeManagerTest.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationDeletionTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationOrderingTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ReplaceWithAttributeTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryTestDemo.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/TransactionEventTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEventTest.java18
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchLinkTest.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchRelationLinkTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/LoadDeletedRelationTest.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtilityTest.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTestManager.java20
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManagerTest.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java4
25 files changed, 81 insertions, 98 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/UserManagerTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/UserManagerTest.java
index 28c0bea50c..16e4062171 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/UserManagerTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/UserManagerTest.java
@@ -95,7 +95,7 @@ public final class UserManagerTest {
for (String name : names) {
//Create artifact
Artifact groupArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.UserGroup, branch, name);
- groupArt.persist();
+ groupArt.persist("Create user group");
//Default Group Attribute
groupArt.addAttribute(CoreAttributeTypes.DefaultGroup, true);
@@ -103,7 +103,7 @@ public final class UserManagerTest {
//Create relation between containing folder and new UserGroup
Artifact groupRoot = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "User Groups", branch);
groupRoot.addRelation(CoreRelationTypes.Default_Hierarchical__Child, groupArt);
- groupRoot.persist();
+ groupRoot.persist("Create user group");
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQueryTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQueryTest.java
index 7903c51c71..28c82df1ee 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQueryTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQueryTest.java
@@ -88,7 +88,7 @@ public class ArtifactCacheQueryTest {
CoreAttributeTypes.StaticId, staticId, BranchManager.getCommonBranch());
assertNotNull(artifact);
artifact.addAttribute(CoreAttributeTypes.StaticId, staticId);
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
Collection<Artifact> artifacts = ArtifactCache.getListByTextId(staticId, BranchManager.getCommonBranch());
assertTrue("Should be 1; Returned " + artifacts.size(), artifacts.size() == 1);
@@ -125,7 +125,7 @@ public class ArtifactCacheQueryTest {
// create artifact with two of same static id values
Artifact artifact =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
artifact.addAttribute(CoreAttributeTypes.StaticId, STATIC_ID_BBB);
artifact.addAttribute(CoreAttributeTypes.StaticId, STATIC_ID_BBB);
ArtifactCache.cacheByTextId(STATIC_ID_BBB, artifact);
@@ -227,14 +227,11 @@ public class ArtifactCacheQueryTest {
List<Artifact> itemsCreated = new ArrayList<Artifact>();
// create single artifact with eee staticId
- SkynetTransaction transaction =
- new SkynetTransaction(BranchManager.getCommonBranch(), "create single artifact with eee staticId");
Artifact artifact =
ArtifactCacheQuery.getOrCreateSingletonArtifactByText(CoreArtifactTypes.GeneralData,
CoreAttributeTypes.StaticId, STATIC_ID_EEE, BranchManager.getCommonBranch());
- artifact.persist(transaction);
+ artifact.persist("create single artifact with eee staticId");
assertNotNull(artifact);
- transaction.execute();
itemsCreated.add(artifact);
@@ -245,12 +242,10 @@ public class ArtifactCacheQueryTest {
assertNotNull(artifact);
// create another artifact with eee staticId
- transaction = new SkynetTransaction(BranchManager.getCommonBranch(), "create another artifact with eee staticId");
artifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
artifact.setSingletonAttributeValue(CoreAttributeTypes.StaticId, STATIC_ID_EEE);
- artifact.persist(transaction);
+ artifact.persist("create another artifact with eee staticId");
assertNotNull(artifact);
- transaction.execute();
itemsCreated.add(artifact);
// test that there are now two artifacts with eee
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPurgeTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPurgeTest.java
index c6b9422705..b9d7e84b81 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPurgeTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPurgeTest.java
@@ -18,8 +18,8 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.skynet.core.mocks.DbTestUtil;
-import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.util.FrameworkTestUtil;
+import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.support.test.util.DemoSawBuilds;
import org.eclipse.osee.support.test.util.TestUtil;
@@ -41,19 +41,15 @@ public class ArtifactPurgeTest extends AbstractPurgeTest {
// Create some software artifacts
Branch branch = BranchManager.getBranch(DemoSawBuilds.SAW_Bld_2.getName());
- SkynetTransaction transaction = new SkynetTransaction(branch, "Test purge artifacts");
Collection<Artifact> softArts =
FrameworkTestUtil.createSimpleArtifacts(CoreArtifactTypes.SoftwareRequirement, 10, getClass().getSimpleName(),
branch);
- for (Artifact softArt : softArts) {
- softArt.persist(transaction);
- }
- transaction.execute();
+ Artifacts.persistInTransaction("Test purge artifacts", softArts);
// make more changes to artifacts
for (Artifact softArt : softArts) {
softArt.addAttribute(CoreAttributeTypes.StaticId, getClass().getSimpleName());
- softArt.persist();
+ softArt.persist(getClass().getSimpleName());
}
// Count rows and check that increased
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_getLastModified.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_getLastModified.java
index 27cb006111..93cbdd78e2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_getLastModified.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_getLastModified.java
@@ -50,7 +50,7 @@ public class Artifact_getLastModified {
Date previousModifyDate = artifact.getLastModified();
Thread.sleep(1100); // just enough time to guarantee the date will be at least a second later
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertBefore(previousModifyDate, artifact);
Assert.assertEquals(UserManager.getUser(), artifact.getLastModifiedBy());
@@ -59,7 +59,7 @@ public class Artifact_getLastModified {
// Test post-modified
artifact.setSingletonAttributeValue(CoreAttributeTypes.StaticId, "this");
Thread.sleep(1100); // just enough time to guarantee the date will be at least a second later
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertBefore(previousModifyDate, artifact);
Assert.assertEquals(UserManager.getUser(), artifact.getLastModifiedBy());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_setAttributeValues.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_setAttributeValues.java
index 8084875c86..53910100d5 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_setAttributeValues.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact_setAttributeValues.java
@@ -48,7 +48,7 @@ public class Artifact_setAttributeValues {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, DemoSawBuilds.SAW_Bld_1,
getClass().getSimpleName());
artifact.setAttributeValues(CoreAttributeTypes.StaticId, firstSet);
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertTrue(Collections.isEqual(firstSet, artifact.getAttributesToStringList(CoreAttributeTypes.StaticId)));
}
@@ -57,7 +57,7 @@ public class Artifact_setAttributeValues {
public void testSetAttributeValuesAddOne() throws Exception {
Artifact artifact = getArtifact();
artifact.setAttributeValues(CoreAttributeTypes.StaticId, addOneSet);
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertTrue(Collections.isEqual(addOneSet, artifact.getAttributesToStringList(CoreAttributeTypes.StaticId)));
}
@@ -66,7 +66,7 @@ public class Artifact_setAttributeValues {
public void testSetAttributeValuesAddOneRemoveOne() throws Exception {
Artifact artifact = getArtifact();
artifact.setAttributeValues(CoreAttributeTypes.StaticId, addOneRemoveOneSet);
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertTrue(Collections.isEqual(addOneRemoveOneSet,
artifact.getAttributesToStringList(CoreAttributeTypes.StaticId)));
@@ -76,7 +76,7 @@ public class Artifact_setAttributeValues {
public void testSetAttributeValuesRemoveAll() throws Exception {
Artifact artifact = getArtifact();
artifact.setAttributeValues(CoreAttributeTypes.StaticId, emptySet);
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertTrue(artifact.getAttributesToStringList(CoreAttributeTypes.StaticId).isEmpty());
}
@@ -85,7 +85,7 @@ public class Artifact_setAttributeValues {
public void testSetAttributeValuesWithDuplicates() throws Exception {
Artifact artifact = getArtifact();
artifact.setAttributeValues(CoreAttributeTypes.StaticId, addDuplicates_set);
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
assertTrue(Collections.isEqual(addDuplicates_result,
artifact.getAttributesToStringList(CoreAttributeTypes.StaticId)));
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/AttributePurgeTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/AttributePurgeTest.java
index f86de55400..c06251e8d0 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/AttributePurgeTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/AttributePurgeTest.java
@@ -56,7 +56,7 @@ public class AttributePurgeTest extends AbstractPurgeTest {
// make more changes to artifacts
for (Artifact softArt : softArts) {
softArt.addAttribute(CoreAttributeTypes.StaticId, getClass().getSimpleName());
- softArt.persist();
+ softArt.persist(getClass().getName());
}
// Count rows and check that increased
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchPurgeTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchPurgeTest.java
index f1df9a11ec..ab578a6b2b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchPurgeTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchPurgeTest.java
@@ -24,8 +24,8 @@ import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.httpRequests.PurgeBranchHttpRequestOperation;
import org.eclipse.osee.framework.skynet.core.mocks.DbTestUtil;
-import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.util.FrameworkTestUtil;
+import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.support.test.util.DemoSawBuilds;
import org.eclipse.osee.support.test.util.TestUtil;
import org.junit.After;
@@ -66,19 +66,15 @@ public class BranchPurgeTest {
TestUtil.sleep(4000);
// create some software artifacts
- SkynetTransaction transaction = new SkynetTransaction(branch, "Test purge branch");
Collection<Artifact> softArts =
FrameworkTestUtil.createSimpleArtifacts(CoreArtifactTypes.SoftwareRequirement, 10, getClass().getSimpleName(),
branch);
- for (Artifact softArt : softArts) {
- softArt.persist(transaction);
- }
- transaction.execute();
+ Artifacts.persistInTransaction("Test purge branch", softArts);
// make more changes to artifacts
for (Artifact softArt : softArts) {
softArt.addAttribute(CoreAttributeTypes.StaticId, getClass().getSimpleName());
- softArt.persist();
+ softArt.persist(getClass().getSimpleName());
}
// Count rows and check that increased
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchStateTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchStateTest.java
index 6b7367e3f2..b7f0ca7d56 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchStateTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/BranchStateTest.java
@@ -79,7 +79,7 @@ public class BranchStateTest {
Artifact change =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch,
"Test Object on Working Branch");
- change.persist();
+ change.persist(getClass().getSimpleName());
assertEquals(BranchState.MODIFIED, workingBranch.getBranchState());
assertTrue(workingBranch.isEditable());
@@ -128,7 +128,7 @@ public class BranchStateTest {
change =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch, "A commit change");
- change.persist();
+ change.persist(getClass().getSimpleName());
assertEquals(BranchState.MODIFIED, workingBranch.getBranchState());
assertTrue(workingBranch.isEditable());
@@ -196,7 +196,7 @@ public class BranchStateTest {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, DemoSawBuilds.SAW_Bld_1,
"Test Object");
baseArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation, "This is the base annotation");
- baseArtifact.persist();
+ baseArtifact.persist(getClass().getSimpleName());
User user = UserManager.getUser(SystemUser.OseeSystem);
workingBranch = BranchManager.createWorkingBranch(DemoSawBuilds.SAW_Bld_1, originalBranchName, user);
@@ -205,11 +205,11 @@ public class BranchStateTest {
change =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch,
"Test Object on Working Branch");
- change.persist();
+ change.persist(getClass().getSimpleName());
// Make a change on the parent
baseArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation, "This is the updated annotation");
- baseArtifact.persist();
+ baseArtifact.persist(getClass().getSimpleName());
// Update the branch
ConflictResolverOperation resolverOperation =
@@ -253,7 +253,7 @@ public class BranchStateTest {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, DemoSawBuilds.SAW_Bld_1,
"Test Object");
baseArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation, "This is the base annotation");
- baseArtifact.persist();
+ baseArtifact.persist(getClass().getSimpleName());
User user = UserManager.getUser(SystemUser.OseeSystem);
workingBranch = BranchManager.createWorkingBranch(DemoSawBuilds.SAW_Bld_1, originalBranchName, user);
@@ -262,11 +262,11 @@ public class BranchStateTest {
sameArtifact = ArtifactQuery.getArtifactFromId(baseArtifact.getGuid(), workingBranch);
sameArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation,
"This is the working branch update annotation");
- sameArtifact.persist();
+ sameArtifact.persist(getClass().getSimpleName());
// Make a change on the parent
baseArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation, "This is the updated annotation");
- baseArtifact.persist();
+ baseArtifact.persist(getClass().getSimpleName());
ConflictResolverOperation resolverOperation =
new ConflictResolverOperation("Test 2 Resolver", BranchStateTest.class.getCanonicalName()) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeManagerTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeManagerTest.java
index 8524696171..af6b0908f1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeManagerTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeManagerTest.java
@@ -51,7 +51,7 @@ public class ChangeManagerTest {
assertFalse("This test can not be run on Production", ClientSessionManager.isProductionDataStore());
modArtifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, CoreBranches.SYSTEM_ROOT);
- modArtifact.persist();
+ modArtifact.persist(getClass().getSimpleName());
sleep(5000);
@@ -63,7 +63,7 @@ public class ChangeManagerTest {
sleep(5000);
newArtifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, branch);
- newArtifact.persist();
+ newArtifact.persist(getClass().getSimpleName());
sleep(5000);
BranchManager.refreshBranches();
}
@@ -81,7 +81,7 @@ public class ChangeManagerTest {
newArtifact.setSoleAttributeFromString(CoreAttributeTypes.WordTemplateContent, "new content");
assertTrue("Check artifact is still new", checkArtifactModType(newArtifact, ModificationType.NEW));
modArtifact.setSoleAttributeFromString(CoreAttributeTypes.WordTemplateContent, "changed content");
- modArtifact.persist();
+ modArtifact.persist(getClass().getSimpleName());
assertTrue("Check artifact has changed", checkArtifactModType(modArtifact, ModificationType.NEW));
}
@@ -93,7 +93,7 @@ public class ChangeManagerTest {
@After
public void tearDown() throws Exception {
- modArtifact.persist();
+ modArtifact.persist(getClass().getSimpleName());
BranchManager.purgeBranch(branch);
sleep(5000);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java
index e0c569fa6c..f87a8515f7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java
@@ -62,7 +62,7 @@ public class NativeArtifactTest {
public void testSetAndGetValueAsString() throws Exception {
Artifact nativeArtifact = getNativeArtifact();
nativeArtifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent, "hello world");
- nativeArtifact.persist();
+ nativeArtifact.persist(getClass().getSimpleName());
String content = nativeArtifact.getSoleAttributeValueAsString(CoreAttributeTypes.NativeContent, "");
assertEquals("hello world", content);
}
@@ -73,7 +73,7 @@ public class NativeArtifactTest {
Lib.writeStringToFile("hello world", file);
Artifact nativeArtifact = getNativeArtifact();
nativeArtifact.setSoleAttributeFromStream(CoreAttributeTypes.NativeContent, new FileInputStream(file));
- nativeArtifact.persist();
+ nativeArtifact.persist(getClass().getSimpleName());
InputStream inputStream = null;
try {
inputStream = nativeArtifact.getSoleAttributeValue(CoreAttributeTypes.NativeContent, null);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationDeletionTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationDeletionTest.java
index 1836336743..3484d46cdc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationDeletionTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationDeletionTest.java
@@ -47,7 +47,7 @@ public class RelationDeletionTest {
parent.addRelation(CoreRelationTypes.Default_Hierarchical__Child, child1);
parent.addRelation(CoreRelationTypes.Default_Hierarchical__Child, child2);
parent.addRelation(CoreRelationTypes.Default_Hierarchical__Child, child3);
- parent.persist();
+ parent.persist(getClass().getSimpleName());
assertTrue("Failed to add all three children",
parent.getRelatedArtifacts(CoreRelationTypes.Default_Hierarchical__Child).size() == 3);
@@ -57,7 +57,7 @@ public class RelationDeletionTest {
assertTrue("We removed a relation so it should still be dirty.", child1.isDirty());
assertTrue("Parent artifact should be marked as dirty since it's relation has changed.", parent.isDirty());
- child1.persist();
+ child1.persist(getClass().getSimpleName());
assertFalse("Parent artifact should be clean now.", parent.isDirty());
assertFalse("Child artifact should also be clean.", child1.isDirty());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationOrderingTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationOrderingTest.java
index 4cf30fff07..9357ceb194 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationOrderingTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/RelationOrderingTest.java
@@ -112,7 +112,7 @@ public class RelationOrderingTest {
parent.addRelation(CoreRelationTypes.Users_User, child4);
parent.addRelation(CoreRelationTypes.Users_User, child5);
parent.addRelation(CoreRelationTypes.Users_User, child6);
- parent.persist();
+ parent.persist(getClass().getSimpleName());
parent.setRelationOrder(CoreRelationTypes.Users_User, RelationOrderBaseTypes.LEXICOGRAPHICAL_DESC);
@@ -209,7 +209,7 @@ public class RelationOrderingTest {
"New Artifact " + guid);
mainFolder.addChild(newArtifact);
newArtifact.setSingletonAttributeValue(CoreAttributeTypes.StaticId, STATIC_ID_TO_DELETE);
- newArtifact.persist();
+ newArtifact.persist(getClass().getSimpleName());
for (Artifact child : children) {
Assert.assertFalse(child.isDirty());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ReplaceWithAttributeTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ReplaceWithAttributeTest.java
index d3ff6c795e..5d51cd5946 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ReplaceWithAttributeTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/ReplaceWithAttributeTest.java
@@ -31,14 +31,14 @@ public class ReplaceWithAttributeTest {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, DemoSawBuilds.SAW_Bld_1,
getClass().getSimpleName());
artifact.setAttributeValues(CoreAttributeTypes.Name, Collections.singletonList("Name"));
- artifact.persist();
+ artifact.persist(getClass().getSimpleName());
Attribute<?> nameAttribute = artifact.getAttributes(CoreAttributeTypes.Name).iterator().next();
int previousGamma = nameAttribute.getGammaId();
String previousName = nameAttribute.getDisplayableString();
nameAttribute.setFromString("New Name");
- nameAttribute.getArtifact().persist();
+ nameAttribute.getArtifact().persist(getClass().getSimpleName());
nameAttribute.replaceWithVersion(previousGamma);
assertTrue(nameAttribute.getGammaId() == previousGamma);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryTestDemo.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryTestDemo.java
index 0041354ca6..b60a96eeca 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryTestDemo.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryTestDemo.java
@@ -35,7 +35,7 @@ public class ArtifactQueryTestDemo {
public void testGetArtifactFromGUIDDeleted() throws OseeCoreException {
Artifact newArtifact =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
- newArtifact.persist();
+ newArtifact.persist(getClass().getSimpleName());
// Should exist
Artifact searchedArtifact =
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/TransactionEventTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/TransactionEventTest.java
index 1dfe95157a..310374866d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/TransactionEventTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/TransactionEventTest.java
@@ -85,7 +85,7 @@ public abstract class TransactionEventTest {
// Create and persist new artifact
Artifact newArt =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch(), START_NAME);
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
Assert.assertEquals(START_NAME, newArt.getName());
Assert.assertFalse(newArt.isDirty());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEventTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEventTest.java
index 380ba3f3f8..e984a0b604 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEventTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEventTest.java
@@ -186,7 +186,7 @@ public class ArtifactEventTest {
private Artifact testArtifactRelationEvents__addArtifact() throws Exception {
Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
Assert.assertEquals(2, resultEventArtifacts.size());
Assert.assertEquals("No relations events should be sent", 0, resultEventRelations.size());
@@ -217,7 +217,7 @@ public class ArtifactEventTest {
clearEventCollections();
Artifact rootArt = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(BranchManager.getCommonBranch());
rootArt.addChild(newArt);
- rootArt.persist();
+ rootArt.persist(getClass().getSimpleName());
Assert.assertEquals("No artifact events should be sent", 0, resultEventArtifacts.size());
Assert.assertEquals(1, resultEventRelations.size());
@@ -241,7 +241,7 @@ public class ArtifactEventTest {
private void testArtifactRelationEvents__modifyArtifact(Artifact newArt) throws Exception {
clearEventCollections();
newArt.setSingletonAttributeValue(CoreAttributeTypes.StaticId, "this");
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
Assert.assertEquals(1, resultEventArtifacts.size());
Assert.assertEquals("No relations events should be sent", 0, resultEventRelations.size());
@@ -265,7 +265,7 @@ public class ArtifactEventTest {
Assert.assertEquals(1, newArt.internalGetRelations(rootArt).size());
RelationLink relLink = newArt.internalGetRelations(rootArt).iterator().next();
relLink.setRationale(NEW_RATIONALE_STR);
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
Assert.assertEquals("No artifact events should be sent", 0, resultEventArtifacts.size());
Assert.assertEquals(1, resultEventRelations.size());
@@ -515,7 +515,7 @@ public class ArtifactEventTest {
Artifact injectArt =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
injectArt.setName(ORIG_NAME);
- injectArt.persist();
+ injectArt.persist(getClass().getSimpleName());
clearEventCollections();
@@ -704,7 +704,7 @@ public class ArtifactEventTest {
artifactsInNewOrder.add(orderedChildren.get(2));
artifactsInNewOrder.add(orderedChildren.get(4));
newArt.setRelationOrder(CoreRelationTypes.Default_Hierarchical__Child, artifactsInNewOrder);
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
Assert.assertEquals("newArt will change cause attribute modified", 1, resultEventArtifacts.size());
Assert.assertEquals("No relations events should be sent", 0, resultEventRelations.size());
@@ -784,7 +784,7 @@ public class ArtifactEventTest {
// Add new Artifact Test
Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
newArt.setName(getClass().getSimpleName() + " - testPurgeArtifactEvents");
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
OseeEventManager.addListener(artifactEventListener);
Assert.assertEquals(1, OseeEventManager.getNumberOfListeners());
@@ -820,7 +820,7 @@ public class ArtifactEventTest {
// Add new Artifact Test
Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
newArt.setName(getClass().getSimpleName() + " - testReloadArtifactEvents");
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
OseeEventManager.addListener(artifactEventListener);
Assert.assertEquals(1, OseeEventManager.getNumberOfListeners());
@@ -856,7 +856,7 @@ public class ArtifactEventTest {
// Add new Artifact for Test
Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, BranchManager.getCommonBranch());
newArt.setName(getClass().getSimpleName() + " - testChangeTypeArtifactEvents");
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
OseeEventManager.addListener(artifactEventListener);
Assert.assertEquals(1, OseeEventManager.getNumberOfListeners());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventTest.java
index b0e89209a1..4411f692d3 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventTest.java
@@ -125,7 +125,7 @@ public class BranchEventTest {
final String guid = workingBranch.getGuid();
Assert.assertNotNull(workingBranch);
Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralData, workingBranch);
- newArt.persist();
+ newArt.persist(getClass().getSimpleName());
ConflictManagerExternal conflictManager = new ConflictManagerExternal(topLevel, workingBranch);
BranchManager.commitBranch(null, conflictManager, true, true);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchLinkTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchLinkTest.java
index a927783208..29ce48ea3d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchLinkTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchLinkTest.java
@@ -65,7 +65,7 @@ public class CrossBranchLinkTest {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, DemoSawBuilds.SAW_Bld_1,
getClass().getSimpleName() + "-1");
artifact1.addAttribute(CoreAttributeTypes.StaticId, CrossBranchLinkTest.class.getSimpleName());
- artifact1.persist();
+ artifact1.persist(getClass().getSimpleName());
// test equals
CrossBranchLink linkA = new CrossBranchLink(CoreRelationTypes.SupportingInfo_SupportingInfo, artifact1);
@@ -87,7 +87,7 @@ public class CrossBranchLinkTest {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, DemoSawBuilds.SAW_Bld_1,
getClass().getSimpleName() + "-2");
artifact2.addAttribute(CoreAttributeTypes.StaticId, CrossBranchLinkTest.class.getSimpleName());
- artifact2.persist();
+ artifact2.persist(getClass().getSimpleName());
CrossBranchLinkManager.addRelation(folderArt, CoreRelationTypes.SupportingInfo_SupportingInfo, artifact2);
@@ -95,7 +95,7 @@ public class CrossBranchLinkTest {
ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, DemoSawBuilds.SAW_Bld_1,
getClass().getSimpleName() + "-3");
artifact3.addAttribute(CoreAttributeTypes.StaticId, CrossBranchLinkTest.class.getSimpleName());
- artifact3.persist();
+ artifact3.persist(getClass().getSimpleName());
CrossBranchLinkManager.addRelation(folderArt, CoreRelationTypes.Supercedes_Supercedes, artifact3);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchRelationLinkTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchRelationLinkTest.java
index d456e269dd..2329edf0e4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchRelationLinkTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/CrossBranchRelationLinkTest.java
@@ -38,8 +38,8 @@ public class CrossBranchRelationLinkTest {
branch2 = BranchManager.getBranch("SAW_Bld_2");
left = FrameworkTestUtil.createSimpleArtifact(CoreArtifactTypes.Requirement, "Left", branch1);
right = FrameworkTestUtil.createSimpleArtifact(CoreArtifactTypes.Requirement, "Right", branch2);
- left.persist();
- right.persist();
+ left.persist(getClass().getSimpleName());
+ right.persist(getClass().getSimpleName());
}
@Test(expected = OseeArgumentException.class)
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/LoadDeletedRelationTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/LoadDeletedRelationTest.java
index 4e61b66870..0cee67a07f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/LoadDeletedRelationTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/LoadDeletedRelationTest.java
@@ -42,8 +42,8 @@ public class LoadDeletedRelationTest {
branch = BranchManager.getBranch("SAW_Bld_2");
left = FrameworkTestUtil.createSimpleArtifact(CoreArtifactTypes.Requirement, "Left", branch);
right = FrameworkTestUtil.createSimpleArtifact(CoreArtifactTypes.Requirement, "Right", branch);
- left.persist();
- right.persist();
+ left.persist(getClass().getSimpleName());
+ right.persist(getClass().getSimpleName());
type = CoreRelationTypes.Requirement_Trace__Higher_Level;
}
@@ -52,13 +52,13 @@ public class LoadDeletedRelationTest {
@Test
public void loadDeletedRelationTest() throws OseeCoreException {
RelationManager.addRelation(type, left, right, "");
- left.persist();
+ left.persist(getClass().getSimpleName());
RelationLink loaded = RelationManager.getLoadedRelation(type, left.getArtId(), right.getArtId(), branch);
int oldGammaId = loaded.getGammaId();
RelationManager.deleteRelation(type, left, right);
- left.persist();
+ left.persist(getClass().getSimpleName());
RelationManager.addRelation(type, left, right, "");
- left.persist();
+ left.persist(getClass().getSimpleName());
List<RelationLink> links = RelationManager.getRelationsAll(left, DeletionFlag.INCLUDE_DELETED);
int linkCount = 0;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtilityTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtilityTest.java
index cf6e9d9be3..f644bb237f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtilityTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtilityTest.java
@@ -68,7 +68,7 @@ public class RelationOrderMergeUtilityTest {
for (int i = 0; i < 5; i++) {
setAsChild(parent, children[i], ascOrder);
}
- parent.persist();
+ parent.persist(getClass().getSimpleName());
RelationOrderData mergedOrder = RelationOrderMergeUtility.mergeRelationOrder(parent, parent);
Assert.assertNotNull(mergedOrder);
@@ -85,13 +85,13 @@ public class RelationOrderMergeUtilityTest {
for (int i = 0; i <= 3; i++) {
setAsChild(destParent, destChildren[i], USER_DEFINED);
}
- destParent.persist();
+ destParent.persist(getClass().getSimpleName());
Branch sourceBranch = BranchManager.createWorkingBranch(destBranch, "Source Branch", null);
Artifact srcParent = ArtifactQuery.getArtifactFromId(destParent.getGuid(), sourceBranch);
Artifact srcChild = ArtifactQuery.getArtifactFromId(destChildren[4].getGuid(), sourceBranch);
setAsChild(srcParent, srcChild, USER_DEFINED);
- srcParent.persist();
+ srcParent.persist(getClass().getSimpleName());
RelationManager.deleteRelationsAll(destChildren[0], true);
RelationOrderData mergedOrder = RelationOrderMergeUtility.mergeRelationOrder(destParent, srcParent);
@@ -121,8 +121,8 @@ public class RelationOrderMergeUtilityTest {
setAsChild(descParent, descRelatives[i], descOrder);
}
- ascParent.persist();
- descParent.persist();
+ ascParent.persist(getClass().getSimpleName());
+ descParent.persist(getClass().getSimpleName());
RelationOrderData mergedOrder = RelationOrderMergeUtility.mergeRelationOrder(ascParent, descParent);
Assert.assertNull(mergedOrder);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTestManager.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTestManager.java
index 845cecf727..c6b6dfb800 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTestManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTestManager.java
@@ -176,7 +176,7 @@ public class ConflictTestManager {
for (AttributeValue value : conflictDefs[i].newAttributes) {
destArtifacts[i].addAttribute(value.attributeType, stringToObject(value.clas, value.sourceValue));
}
- destArtifacts[i].persist();
+ destArtifacts[i].persist(ConflictTestManager.class.getSimpleName());
}
// Create the source branch
sourceBranch = BranchManager.createWorkingBranch(destBranch, SOURCE_BRANCH, null);
@@ -210,8 +210,8 @@ public class ConflictTestManager {
destArtifacts[i].setSoleAttributeValue(value.attributeType, stringToObject(value.clas, value.destValue));
}
}
- sourceArtifacts[i].persist();
- destArtifacts[i].persist();
+ sourceArtifacts[i].persist(ConflictTestManager.class.getSimpleName());
+ destArtifacts[i].persist(ConflictTestManager.class.getSimpleName());
}
for (int i = 0; i < NUMBER_OF_ARTIFACTS; i++) {
@@ -239,7 +239,7 @@ public class ConflictTestManager {
System.out.println(" ");
}
}
- rootArtifact.persist();
+ rootArtifact.persist(ConflictTestManager.class.getSimpleName());
performModifications();
}
@@ -276,13 +276,13 @@ public class ConflictTestManager {
createAttribute((Artifact) modification.object, AttributeTypeManager.getType(modification.name),
modification.clas, modification.value);
((Artifact) modification.object).deleteSoleAttribute(AttributeTypeManager.getType(modification.name));
- ((Artifact) modification.object).persist();
+ ((Artifact) modification.object).persist(ConflictTestManager.class.getSimpleName());
break;
case RELATION:
createRelation((Artifact) modification.object, (Artifact) modification.object2);
((Artifact) modification.object).deleteRelation(CoreRelationTypes.Dependency__Dependency,
(Artifact) modification.object2);
- ((Artifact) modification.object).persist();
+ ((Artifact) modification.object).persist(ConflictTestManager.class.getSimpleName());
break;
}
@@ -306,20 +306,20 @@ public class ConflictTestManager {
}
}
Artifact child = rootArtifact.addNewChild(RelationOrderBaseTypes.USER_DEFINED, type, name);
- child.persist();
- rootArtifact.persist();
+ child.persist(ConflictTestManager.class.getSimpleName());
+ rootArtifact.persist(ConflictTestManager.class.getSimpleName());
return child;
}
protected static Attribute<?> createAttribute(Artifact artifact, IAttributeType attributeType, Class<?> clas, String value) throws OseeCoreException {
artifact.addAttribute(attributeType, stringToObject(clas, value));
- artifact.persist();
+ artifact.persist(ConflictTestManager.class.getSimpleName());
return artifact.getSoleAttribute(attributeType);
}
protected static RelationLink createRelation(Artifact artifact, Artifact artifactB) throws OseeCoreException {
artifact.addRelation(CoreRelationTypes.Dependency__Dependency, artifactB);
- artifact.persist();
+ artifact.persist(ConflictTestManager.class.getSimpleName());
return artifact.getRelations(CoreRelationTypes.Dependency__Dependency).get(0);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java
index 54d147c602..21d8d31260 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/DeletionTest.java
@@ -270,7 +270,7 @@ public class DeletionTest {
artifactForDeletionCheck.getRelations(CoreRelationTypes.Default_Hierarchical__Child).get(0);
attribute.delete();
relation.delete(true);
- artifactForDeletionCheck.persist();
+ artifactForDeletionCheck.persist(getClass().getSimpleName());
//check for internal deletions and then check the database
assertTrue("Attribute " + attribute.getId() + " should be deleted but isn't", attribute.isDeleted());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManagerTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManagerTest.java
index 291a04b3b0..a809419e2d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManagerTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManagerTest.java
@@ -11,9 +11,7 @@
package org.eclipse.osee.framework.skynet.core.transaction;
import static org.junit.Assert.assertFalse;
-
import java.util.List;
-
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.jdk.core.util.GUID;
@@ -40,10 +38,8 @@ public class TransactionManagerTest {
// Create new transaction
String guid = GUID.create();
String comment = "TransactionManagerTest-" + guid;
- SkynetTransaction newTransaction = new SkynetTransaction(BranchManager.getCommonBranch(), comment);
Artifact art = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, BranchManager.getCommonBranch());
- art.persist(newTransaction);
- newTransaction.execute();
+ art.persist(comment);
// Find transaction
List<TransactionRecord> transactions = TransactionManager.getTransaction(comment);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java
index 0776f84c27..c2cd97ed1b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java
@@ -44,7 +44,7 @@ public class CsvArtifactTest {
assertEquals(csv.getCsvData(), "");
csv.getArtifact().setName(id);
csv.setCsvData(csvData);
- csv.getArtifact().persist();
+ csv.getArtifact().persist(getClass().getSimpleName());
}
@org.junit.Test
@@ -53,7 +53,7 @@ public class CsvArtifactTest {
assertNotNull(csvArt);
assertEquals(csvData, csvArt.getCsvData());
csvArt.appendData(appendData);
- csvArt.getArtifact().persist();
+ csvArt.getArtifact().persist(getClass().getSimpleName());
}
@org.junit.Test

Back to the top