Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-03-16 17:55:57 -0400
committerRyan D. Brooks2011-03-16 17:55:57 -0400
commitb6b500cc9f3227a7bbc5ad45f87428511edbb49f (patch)
tree7ff258f08b06c682cd570e646fbff363501722b2 /plugins/org.eclipse.osee.framework.skynet.core.test
parentf3b338adedd04c88ef559cb931983d56a282700b (diff)
downloadorg.eclipse.osee-b6b500cc9f3227a7bbc5ad45f87428511edbb49f.tar.gz
org.eclipse.osee-b6b500cc9f3227a7bbc5ad45f87428511edbb49f.tar.xz
org.eclipse.osee-b6b500cc9f3227a7bbc5ad45f87428511edbb49f.zip
bug[ats_6FM4J]: Subscriptions not working for new actions
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/test/event/ArtifactEventFiltersTest.java31
1 files changed, 13 insertions, 18 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/ArtifactEventFiltersTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/ArtifactEventFiltersTest.java
index bee74098ac..cebd579add 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/ArtifactEventFiltersTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/ArtifactEventFiltersTest.java
@@ -13,8 +13,7 @@ package org.eclipse.osee.framework.skynet.core.test.event;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.junit.Assert;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import junit.framework.Assert;
import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.jdk.core.util.GUID;
@@ -73,27 +72,27 @@ public class ArtifactEventFiltersTest {
EventBasicGuidArtifact guidArt =
new EventBasicGuidArtifact(EventModType.Added, GUID.create(), CoreArtifactTypes.Requirement.getGuid(),
GUID.create());
+ List<EventBasicGuidArtifact> guidArts = Arrays.asList(guidArt);
- Assert.assertTrue("Should match cause same artifact type", typeFilter.isMatch(guidArt));
+ Assert.assertTrue("Should match cause same artifact type", typeFilter.isMatchArtifacts(guidArts));
guidArt.setArtTypeGuid(CoreArtifactTypes.SoftwareRequirement.getGuid());
Assert.assertTrue("Should match cause SoftwareRequirement is subclass of Requirement",
- typeFilter.isMatch(guidArt));
+ typeFilter.isMatchArtifacts(guidArts));
typeFilter = new ArtifactTypeEventFilter(CoreArtifactTypes.SoftwareRequirement);
guidArt.setArtTypeGuid(CoreArtifactTypes.Requirement.getGuid());
Assert.assertFalse("Should NOT match cause Requirement is NOT subclass of Software Requirement",
- typeFilter.isMatch(guidArt));
+ typeFilter.isMatchArtifacts(guidArts));
}
private void testArtifactEventFilters__branchFilter() throws Exception {
// Create dummy artifact event
String branchGuid = GUID.create();
- IOseeBranch branchToken = TokenFactory.createBranch(branchGuid, "test branch");
- ArtifactEvent testArtifactEvent = new ArtifactEvent(branchToken);
+ ArtifactEvent testArtifactEvent = new ArtifactEvent(TokenFactory.createBranch(branchGuid, "test branch"));
testArtifactEvent.setNetworkSender(getDummyRemoteNetworkSender());
// Register set filters to null to see if event comes through
@@ -139,18 +138,18 @@ public class ArtifactEventFiltersTest {
private void testArtifactEventFilters__branchFilterArtifactType() throws Exception {
// Create dummy artifact event
String branchGuid = GUID.create();
- IOseeBranch branchToken = TokenFactory.createBranch(branchGuid, "test branch 2");
- ArtifactEvent testArtifactEvent = new ArtifactEvent(branchToken);
+ ArtifactEvent testArtifactEvent = new ArtifactEvent(TokenFactory.createBranch(branchGuid, "test branch 2"));
testArtifactEvent.setNetworkSender(getDummyRemoteNetworkSender());
testArtifactEvent.getArtifacts().add(
new EventBasicGuidArtifact(EventModType.Added, branchGuid, CoreArtifactTypes.GeneralDocument.getGuid(),
GUID.create()));
+ testArtifactEvent.getArtifacts().add(
+ new EventBasicGuidArtifact(EventModType.Added, branchGuid, CoreArtifactTypes.Component.getGuid(),
+ GUID.create()));
// Reset event filters only allow events from this branch
eventFilters = new ArrayList<IEventFilter>();
-
- IOseeBranch branchToken2 = TokenFactory.createBranch(branchGuid, "Test Branch");
- eventFilters.add(new BranchGuidEventFilter(branchToken2));
+ eventFilters.add(new BranchGuidEventFilter(TokenFactory.createBranch(branchGuid, "Test Branch")));
eventFilters.add(new ArtifactTypeEventFilter(CoreArtifactTypes.GeneralDocument));
resultArtifactEvent = null;
resultSender = null;
@@ -165,9 +164,7 @@ public class ArtifactEventFiltersTest {
// Reset event filters to only send other artifact type of this branch
eventFilters = new ArrayList<IEventFilter>();
-
- IOseeBranch branchToken3 = TokenFactory.createBranch(branchGuid, "Test Branch");
- eventFilters.add(new BranchGuidEventFilter(branchToken3));
+ eventFilters.add(new BranchGuidEventFilter(TokenFactory.createBranch(branchGuid, "Test Branch")));
eventFilters.add(new ArtifactTypeEventFilter(CoreArtifactTypes.Folder));
resultArtifactEvent = null;
resultSender = null;
@@ -180,9 +177,7 @@ public class ArtifactEventFiltersTest {
// Reset event filters to only send OTHER branch events
eventFilters = new ArrayList<IEventFilter>();
-
- IOseeBranch branchToken4 = TokenFactory.createBranch(GUID.create(), "Other Test Branch");
- eventFilters.add(new BranchGuidEventFilter(branchToken4));
+ eventFilters.add(new BranchGuidEventFilter(TokenFactory.createBranch(GUID.create(), "Other Test Branch")));
eventFilters.add(new ArtifactTypeEventFilter(CoreArtifactTypes.GeneralDocument));
resultArtifactEvent = null;
resultSender = null;

Back to the top