diff options
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db.test')
4 files changed, 30 insertions, 20 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.test/OrcsDbTestSuite.launch b/plugins/org.eclipse.osee.orcs.db.test/OrcsDbTestSuite.launch index 551cd75fc9d..670adef174f 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/OrcsDbTestSuite.launch +++ b/plugins/org.eclipse.osee.orcs.db.test/OrcsDbTestSuite.launch @@ -3,7 +3,7 @@ <setAttribute key="additional_plugins"> <setEntry value="org.eclipse.equinox.cm:1.1.100.v20150205-1358:default:false"/> <setEntry value="org.eclipse.equinox.ds:1.4.300.v20150423-1356:default:false"/> -<setEntry value="org.eclipse.osee.orcs.db.mock:0.23.0.qualifier:default:false"/> +<setEntry value="org.eclipse.osee.orcs.db.mock:0.24.0.qualifier:default:false"/> <setEntry value="org.hsqldb:2.2.9.qualifier:default:false"/> <setEntry value="org.mockito:1.9.0.qualifier:default:false"/> </setAttribute> @@ -42,7 +42,11 @@ <stringAttribute key="pde.version" value="3.3"/> <stringAttribute key="product" value="org.eclipse.birt.report.engine.ReportEngineSDK"/> <booleanAttribute key="run_in_ui_thread" value="false"/> -<setAttribute key="selected_features"/> +<setAttribute key="selected_features"> +<setEntry value="org.eclipse.osee.orcs.feature:default"/> +<setEntry value="org.eclipse.osee.x.core.external.feature:default"/> +<setEntry value="org.eclipse.osee.x.core.feature:default"/> +</setAttribute> <booleanAttribute key="show_selected_only" value="true"/> <stringAttribute key="timestamp" value="1342550414716"/> <booleanAttribute key="tracing" value="false"/> diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java index 4d60fe72078..d2358eb3f6b 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java @@ -13,6 +13,7 @@ package org.eclipse.osee.orcs.db.internal.change; import java.util.Collection; import java.util.LinkedList; import java.util.List; +import org.eclipse.osee.framework.core.data.ApplicabilityId; 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; @@ -26,7 +27,7 @@ import org.junit.runners.Parameterized.Parameters; /** * {@link ChangeItem} - * + * * <pre> * SRC Art * Delete | Modified | Merged | Introduce @@ -36,7 +37,7 @@ import org.junit.runners.Parameterized.Parameters; * Merged | 9 | 10 | 11 | 12 | * Introduce | 13 | 14 | 15 | 16 | * ----------------------------------------- - * + * * SRC Attr * Delete | Modified | Merged * ------------------------------ @@ -45,7 +46,7 @@ import org.junit.runners.Parameterized.Parameters; * Merged | 7 | 8 | 9 | * ------------------------------ * </pre> - * + * * @author Jeff C. Phillips * @author Karol M. Wilk * @author Ryan D. Brooks @@ -88,9 +89,10 @@ public class ChangeItemConflictTest { // but since we don't seem to handle the mixed case of say artifact on src and attribute on destination ChangeItem item; if (itemType == ItemType.artifact) { - item = ChangeItemUtil.newArtifactChange(0, 0, GAMMA, ModificationType.MODIFIED); + item = ChangeItemUtil.newArtifactChange(0, 0, GAMMA, ModificationType.MODIFIED, ApplicabilityId.valueOf(1L)); } else { - item = ChangeItemUtil.newAttributeChange(0, 0, 0, GAMMA, ModificationType.MODIFIED, "change"); + item = ChangeItemUtil.newAttributeChange(0, 0, 0, GAMMA, ModificationType.MODIFIED, "change", + ApplicabilityId.valueOf(1L)); } buildTestCase(GAMMA, item); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeTestUtility.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeTestUtility.java index 4d6ca457969..d687c65a5c0 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeTestUtility.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeTestUtility.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.db.internal.change; +import org.eclipse.osee.framework.core.data.ApplicabilityId; 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.ChangeVersion; @@ -25,7 +26,7 @@ public final class ChangeTestUtility { } public static ChangeVersion createChange(Long long1, ModificationType mod1) { - return new ChangeVersion(long1, mod1); + return new ChangeVersion(long1, mod1, ApplicabilityId.valueOf(1L)); } public static void checkChange(String message, ChangeVersion expected, ChangeVersion actual) { @@ -49,6 +50,7 @@ public final class ChangeTestUtility { ChangeVersion currentVersion = change.getCurrentVersion(); currentVersion.setGammaId(current.getGammaId()); currentVersion.setModType(current.getModType()); + currentVersion.setApplicabilityId(current.getApplicabilityId()); if (base != null) { change.getBaselineVersion().copy(base); 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 7318dcb8b31..3f37f89e860 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 @@ -19,6 +19,7 @@ import java.util.Collection; 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.enums.ModificationType; import org.eclipse.osee.framework.core.model.change.ChangeItem; import org.eclipse.osee.framework.core.model.change.ChangeItemUtil; @@ -180,8 +181,8 @@ public class MissingChangeItemFactoryTest { final long missingGamma = 9L; long artGamma = 7L; - ChangeItem ci1 = - ChangeItemUtil.newAttributeChange(ci1AttrId, 2, artId, 4L, ModificationType.MODIFIED, Strings.EMPTY_STRING); + ChangeItem ci1 = ChangeItemUtil.newAttributeChange(ci1AttrId, 2, artId, 4L, ModificationType.MODIFIED, + Strings.EMPTY_STRING, ApplicabilityId.valueOf(1L)); changes.add(ci1); List<AttributeData> attrDatas = new LinkedList<>(); @@ -214,7 +215,8 @@ public class MissingChangeItemFactoryTest { int artA = 65; int artB = 2; long srcGamma = 7L; - ChangeItem ci1 = ChangeItemUtil.newRelationChange(relId, 0, srcGamma, ModificationType.NEW, artA, artB, ""); + ChangeItem ci1 = ChangeItemUtil.newRelationChange(relId, 0, srcGamma, ModificationType.NEW, artA, artB, "", + ApplicabilityId.valueOf(1L)); changes.add(ci1); List<AttributeData> attrDatas = new LinkedList<>(); @@ -251,8 +253,8 @@ public class MissingChangeItemFactoryTest { List<ChangeItem> changes = new LinkedList<>(); final int artId = 3; - ChangeItem ci1 = - ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.DELETED, Strings.EMPTY_STRING); + ChangeItem ci1 = ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.DELETED, + Strings.EMPTY_STRING, ApplicabilityId.valueOf(1L)); changes.add(ci1); List<AttributeData> attrDatas = new LinkedList<>(); @@ -280,8 +282,8 @@ public class MissingChangeItemFactoryTest { List<ChangeItem> changes = new LinkedList<>(); final int artId = 3; - ChangeItem ci1 = - ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.ARTIFACT_DELETED, Strings.EMPTY_STRING); + ChangeItem ci1 = ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.ARTIFACT_DELETED, + Strings.EMPTY_STRING, ApplicabilityId.valueOf(1L)); changes.add(ci1); List<AttributeData> attrDatas = new LinkedList<>(); @@ -312,24 +314,24 @@ public class MissingChangeItemFactoryTest { private static ChangeItem createExpected(RelationData data) { return ChangeItemUtil.newRelationChange(data.getLocalId(), 0, data.getVersion().getGammaId(), - determineModType(data), data.getArtIdA(), data.getArtIdB(), ""); + determineModType(data), data.getArtIdA(), data.getArtIdB(), "", ApplicabilityId.valueOf(1L)); } private static ChangeItem createExpected(AttributeData data) { return ChangeItemUtil.newAttributeChange(data.getLocalId(), 0, data.getArtifactId(), - data.getVersion().getGammaId(), determineModType(data), ""); + data.getVersion().getGammaId(), determineModType(data), "", ApplicabilityId.valueOf(1L)); } private static ChangeItem createExpected(ArtifactData data) { return ChangeItemUtil.newArtifactChange(data.getLocalId(), 0, data.getVersion().getGammaId(), - determineModType(data)); + determineModType(data), ApplicabilityId.valueOf(1L)); } private ChangeItem getMatchingChangeItem(ChangeItem item) { for (ChangeItem change : expectedMissingChanges) { if (change.getItemId() == item.getItemId() && // - change.getArtId() == item.getArtId() && // - change.getClass().getSimpleName().equals(item.getClass().getSimpleName())) { + change.getArtId() == item.getArtId() && // + change.getClass().getSimpleName().equals(item.getClass().getSimpleName())) { return change; } } |