Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-04-13 17:17:06 +0000
committerddunne2010-04-13 17:17:06 +0000
commitf304c791497115d4007a3d8ad0109e647120faf3 (patch)
tree75b56ab48cfae8901d13f048f4b54d16679182ab /plugins/org.eclipse.osee.framework.messaging.event.res.test/src
parent068c5956357a12a4bafc474e3ac528ab130947de (diff)
downloadorg.eclipse.osee-f304c791497115d4007a3d8ad0109e647120faf3.tar.gz
org.eclipse.osee-f304c791497115d4007a3d8ad0109e647120faf3.tar.xz
org.eclipse.osee-f304c791497115d4007a3d8ad0109e647120faf3.zip
coverage events
coverage options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging.event.res.test/src')
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/FrameworkRes_Fast_Suite.java9
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchEventTest.java39
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchRenameEventTest.java45
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBroadcastEventTest.java54
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkTransactionDeletedEventTest.java56
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/RemoteNetworkSenderTest.java (renamed from plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkSenderTest.java)27
6 files changed, 8 insertions, 222 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/FrameworkRes_Fast_Suite.java b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/FrameworkRes_Fast_Suite.java
index d78e1093412..651a6ddb8a7 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/FrameworkRes_Fast_Suite.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/FrameworkRes_Fast_Suite.java
@@ -10,17 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.framework.messaging.event.res.test;
-import org.eclipse.osee.framework.messaging.event.res.test.cases.NetworkBranchEventTest;
-import org.eclipse.osee.framework.messaging.event.res.test.cases.NetworkBranchRenameEventTest;
-import org.eclipse.osee.framework.messaging.event.res.test.cases.NetworkBroadcastEventTest;
-import org.eclipse.osee.framework.messaging.event.res.test.cases.NetworkSenderTest;
-import org.eclipse.osee.framework.messaging.event.res.test.cases.NetworkTransactionDeletedEventTest;
+import org.eclipse.osee.framework.messaging.event.res.test.cases.RemoteNetworkSenderTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses( {NetworkBranchEventTest.class, NetworkBranchRenameEventTest.class,
- NetworkBroadcastEventTest.class, NetworkTransactionDeletedEventTest.class, NetworkSenderTest.class})
+@Suite.SuiteClasses( {RemoteNetworkSenderTest.class})
/**
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchEventTest.java b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchEventTest.java
deleted file mode 100644
index 394aa192daa..00000000000
--- a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchEventTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Created on Mar 31, 2010
- *
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
-package org.eclipse.osee.framework.messaging.event.res.test.cases;
-
-import org.eclipse.osee.framework.jdk.core.util.GUID;
-import org.eclipse.osee.framework.messaging.event.res.event.BranchEventModificationType;
-import org.eclipse.osee.framework.messaging.event.res.event.NetworkBranchEvent;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @author Donald G. Dunne
- */
-public class NetworkBranchEventTest {
-
- @Test
- public void testNetworkBroadcastEventNetworkSender() {
- for (BranchEventModificationType modType : BranchEventModificationType.getTypes()) {
- String branchGuid = GUID.create();
- NetworkBranchEvent event = new NetworkBranchEvent(modType, branchGuid, NetworkSenderTest.networkSender);
-
- Assert.assertNotNull(event);
- Assert.assertEquals(modType, event.getModType());
- Assert.assertEquals(branchGuid, event.getBranchGuid());
- Assert.assertEquals(NetworkSenderTest.networkSender, event.getNetworkSender());
-
- NetworkBranchEvent newEvent = new NetworkBranchEvent(event.toXml());
- Assert.assertNotNull(newEvent);
- Assert.assertEquals(modType, newEvent.getModType());
- Assert.assertEquals(branchGuid, newEvent.getBranchGuid());
- Assert.assertEquals(NetworkSenderTest.networkSender, newEvent.getNetworkSender());
-
- }
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchRenameEventTest.java b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchRenameEventTest.java
deleted file mode 100644
index abce28767e5..00000000000
--- a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBranchRenameEventTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Created on Mar 31, 2010
- *
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
-package org.eclipse.osee.framework.messaging.event.res.test.cases;
-
-import org.eclipse.osee.framework.jdk.core.util.GUID;
-import org.eclipse.osee.framework.messaging.event.res.event.BranchEventModificationType;
-import org.eclipse.osee.framework.messaging.event.res.event.NetworkBranchRenameEvent;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @author Donald G. Dunne
- */
-public class NetworkBranchRenameEventTest {
-
- public static String BRANCH_NAME = "New Branch Name";
- public static String SHORT_NAME = "Branch Short Name";
-
- @Test
- public void testNetworkBranchRenameEvent() {
- String branchGuid = GUID.create();
- NetworkBranchRenameEvent event =
- new NetworkBranchRenameEvent(branchGuid, BRANCH_NAME, SHORT_NAME, NetworkSenderTest.networkSender);
-
- Assert.assertNotNull(event);
- Assert.assertEquals(BranchEventModificationType.Renamed, event.getModType());
- Assert.assertEquals(branchGuid, event.getBranchGuid());
- Assert.assertEquals(BRANCH_NAME, event.getBranchName());
- Assert.assertEquals(SHORT_NAME, event.getShortName());
- Assert.assertEquals(NetworkSenderTest.networkSender, event.getNetworkSender());
-
- NetworkBranchRenameEvent newEvent = new NetworkBranchRenameEvent(event.toXml());
- Assert.assertNotNull(newEvent);
- Assert.assertEquals(BranchEventModificationType.Renamed, newEvent.getModType());
- Assert.assertEquals(BRANCH_NAME, newEvent.getBranchName());
- Assert.assertEquals(SHORT_NAME, newEvent.getShortName());
- Assert.assertEquals(branchGuid, newEvent.getBranchGuid());
- Assert.assertEquals(NetworkSenderTest.networkSender, newEvent.getNetworkSender());
-
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBroadcastEventTest.java b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBroadcastEventTest.java
deleted file mode 100644
index 9527befa34f..00000000000
--- a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkBroadcastEventTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Created on Mar 31, 2010
- *
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
-package org.eclipse.osee.framework.messaging.event.res.test.cases;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.osee.framework.messaging.event.res.event.NetworkBroadcastEvent;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @author Donald G. Dunne
- */
-public class NetworkBroadcastEventTest {
-
- public static String EVENT_TYPE = "Event Type";
- public static List<String> USER_IDS = Arrays.asList("23423", "Don Dunne", "hello world");
- public static String MESSAGE = "Now is the ; time for < all good () men to come";
-
- public static NetworkBroadcastEvent event =
- new NetworkBroadcastEvent(EVENT_TYPE, MESSAGE, USER_IDS, NetworkSenderTest.networkSender);
-
- /**
- * Test method for
- * {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkBroadcastEvent#NetworkBroadcastEvent(org.eclipse.osee.framework.messaging.event.res.event.NetworkSender, java.util.List)}
- * .
- */
- @Test
- public void testNetworkBroadcastEventNetworkSender() {
- Assert.assertNotNull(event);
- Assert.assertEquals(EVENT_TYPE, event.getBroadcastEventTypeName());
- Assert.assertEquals(MESSAGE, event.getMessage());
- Assert.assertEquals(USER_IDS, event.getUserIds());
- Assert.assertEquals(NetworkSenderTest.networkSender, event.getNetworkSender());
- }
-
- /**
- * Test method for
- * {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkBroadcastEvent#NetworkBroadcastEvent(java.lang.String)}
- * .
- */
- @Test
- public void testNetworkBroadcastEventString() {
- NetworkBroadcastEvent newEvent = new NetworkBroadcastEvent(event.toXml());
- Assert.assertEquals(EVENT_TYPE, newEvent.getBroadcastEventTypeName());
- Assert.assertEquals(MESSAGE, newEvent.getMessage());
- Assert.assertEquals(USER_IDS, newEvent.getUserIds());
- Assert.assertEquals(NetworkSenderTest.networkSender, newEvent.getNetworkSender());
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkTransactionDeletedEventTest.java b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkTransactionDeletedEventTest.java
deleted file mode 100644
index 5478d570b69..00000000000
--- a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkTransactionDeletedEventTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Created on Mar 31, 2010
- *
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
-package org.eclipse.osee.framework.messaging.event.res.test.cases;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.osee.framework.messaging.event.res.event.NetworkTransactionDeletedEvent;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @author Donald G. Dunne
- */
-public class NetworkTransactionDeletedEventTest {
-
- public static List<Integer> transactionIds = Arrays.asList(1, 324, 543, 23);
- public static NetworkTransactionDeletedEvent event =
- new NetworkTransactionDeletedEvent(NetworkSenderTest.networkSender, transactionIds);
-
- /**
- * Test method for
- * {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkTransactionDeletedEvent#NetworkTransactionDeletedEvent(org.eclipse.osee.framework.messaging.event.res.event.NetworkSender, java.util.List)}
- * .
- */
- @Test
- public void testNetworkTransactionDeletedEventNetworkSenderListOfInteger() {
- Assert.assertNotNull(event);
- Assert.assertEquals(transactionIds, event.getTransactionIds());
- Assert.assertEquals(NetworkSenderTest.networkSender, event.getNetworkSender());
- }
-
- /**
- * Test method for
- * {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkTransactionDeletedEvent#NetworkTransactionDeletedEvent(java.lang.String)}
- * .
- */
- @Test
- public void testNetworkTransactionDeletedEventString() {
- NetworkTransactionDeletedEvent newEvent = new NetworkTransactionDeletedEvent(event.toXml());
- Assert.assertEquals(transactionIds, newEvent.getTransactionIds());
- Assert.assertEquals(NetworkSenderTest.networkSender, newEvent.getNetworkSender());
- }
-
- /**
- * Test method for
- * {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkTransactionDeletedEvent#getTransactionIds()}.
- */
- @Test
- public void testGetTransactionIds() {
- Assert.assertEquals(transactionIds, event.getTransactionIds());
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkSenderTest.java b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/RemoteNetworkSenderTest.java
index 79218f771e0..25b829a90d1 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/NetworkSenderTest.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res.test/src/org/eclipse/osee/framework/messaging/event/res/test/cases/RemoteNetworkSenderTest.java
@@ -5,25 +5,26 @@
*/
package org.eclipse.osee.framework.messaging.event.res.test.cases;
-import org.eclipse.osee.framework.messaging.event.res.event.NetworkSender;
+import org.eclipse.osee.framework.messaging.event.res.RemoteEventUtil;
+import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteNetworkSender1;
import org.junit.Assert;
import org.junit.Test;
/**
* @author Donald G. Dunne
*/
-public class NetworkSenderTest {
+public class RemoteNetworkSenderTest {
public static String Object = "NetworkSendTest.class";
public static String MachineIp = "123.421.56.342";
public static String MachineName = "A2340422";
public static String SessionId = "N23422.32";
public static String ClientVersion = "123.2";
- public static String Port = "485";
+ public static int Port = 485;
public static String UserId = "b345344";
- public static NetworkSender networkSender =
- new NetworkSender(Object, SessionId, MachineName, UserId, MachineIp, Port, ClientVersion);
+ public static RemoteNetworkSender1 networkSender =
+ RemoteEventUtil.getNetworkSender(Object, SessionId, MachineName, UserId, MachineIp, Port, ClientVersion);
/**
* Test method for
@@ -42,22 +43,6 @@ public class NetworkSenderTest {
}
/**
- * Test method for
- * {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkSender#NetworkSender(java.lang.String)}.
- */
- @Test
- public void testNetworkSenderString() {
- NetworkSender newNetworkSender = new NetworkSender(networkSender.toXml());
- Assert.assertEquals(Object, newNetworkSender.getSourceObject());
- Assert.assertEquals(SessionId, newNetworkSender.getSessionId());
- Assert.assertEquals(MachineName, newNetworkSender.getMachineName());
- Assert.assertEquals(UserId, newNetworkSender.getUserId());
- Assert.assertEquals(MachineIp, newNetworkSender.getMachineIp());
- Assert.assertEquals(ClientVersion, newNetworkSender.getClientVersion());
- Assert.assertEquals(Port, newNetworkSender.getPort());
- }
-
- /**
* Test method for {@link org.eclipse.osee.framework.messaging.event.res.event.NetworkSender#getSourceObject()}.
*/
@Test

Back to the top