diff options
author | jmisinco | 2013-11-08 13:06:01 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-12-04 11:14:56 -0500 |
commit | 8233349a064dc0ea7a1347b154114728b2d65806 (patch) | |
tree | 0f9449fdfcac994b1a43a568fc67cd0515341e8f /plugins/org.eclipse.osee.framework.core.server.test | |
parent | b0350ac9f7bcb8645573caf150c1b573c0c4f844 (diff) | |
download | org.eclipse.osee-8233349a064dc0ea7a1347b154114728b2d65806.tar.gz org.eclipse.osee-8233349a064dc0ea7a1347b154114728b2d65806.tar.xz org.eclipse.osee-8233349a064dc0ea7a1347b154114728b2d65806.zip |
feature[ats_XJMFJ]: Remove update session code
Change-Id: I16249b17b4510f8db424b24ca59669d96b9d7b6e
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.server.test')
2 files changed, 10 insertions, 56 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java index 9e44b0eb67..cb6d849a09 100644 --- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java +++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java @@ -34,35 +34,29 @@ public class SessionFactoryTest { private final String guid; private final String userId; private final Date creationDate; - private final String managedByServerId; private final String clientVersion; private final String clientMachineName; private final String clientAddress; private final int clientPort; - private final Date lastInteractionDate; - private final String lastInteractionDetails; private final MockBuildTypeIdentifier typeIdentifier = new MockBuildTypeIdentifier(); private final SessionFactory factory = new SessionFactory(new MockLog(), null, null, typeIdentifier); - public SessionFactoryTest(String guid, String userId, Date creationDate, String managedByServerId, String clientVersion, String clientMachineName, String clientAddress, int clientPort, Date lastInteractionDate, String lastInteractionDetails) { + public SessionFactoryTest(String guid, String userId, Date creationDate, String clientVersion, String clientMachineName, String clientAddress, int clientPort) { super(); this.guid = guid; this.userId = userId; this.creationDate = creationDate; - this.managedByServerId = managedByServerId; this.clientVersion = clientVersion; this.clientMachineName = clientMachineName; this.clientAddress = clientAddress; this.clientPort = clientPort; - this.lastInteractionDate = lastInteractionDate; - this.lastInteractionDetails = lastInteractionDetails; } @Test public void testCreate() { Session session = factory.createNewSession(guid, userId, creationDate, clientVersion, clientMachineName, clientAddress, - clientPort, lastInteractionDate, lastInteractionDetails); + clientPort); Assert.assertEquals(guid, session.getGuid()); Assert.assertEquals(userId, session.getUserId()); @@ -71,8 +65,6 @@ public class SessionFactoryTest { Assert.assertEquals(clientMachineName, session.getClientMachineName()); Assert.assertEquals(clientAddress, session.getClientAddress()); Assert.assertEquals(clientPort, session.getClientPort()); - Assert.assertEquals(lastInteractionDate, session.getLastInteractionDate()); - Assert.assertEquals(lastInteractionDetails, session.getLastInteractionDetails()); } @Parameters @@ -87,21 +79,10 @@ public class SessionFactoryTest { int clientPort = index * 345; Date creationDate = new Date(); String userId = "hello.userId-" + index; - Date lastInteractionDate = new Date(); - String lastInteraction = "lastInteraction-" + index; - String managedByServerId = "serverId-" + index; - data.add(new Object[] { - guid, - userId, - creationDate, - managedByServerId, - clientVersion, - clientMachine, - clientAddress, - clientPort, - lastInteractionDate, - lastInteraction,}); + data.add(new Object[] {guid, userId, creationDate, clientVersion, clientMachine, clientAddress, clientPort + + }); } return data; } diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java index 0c5f5f6bab..7817b7f112 100644 --- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java +++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java @@ -37,10 +37,8 @@ public class SessionTest { private final int expectedClientPort; private final Date expectedCreationDate; private final String expectedUserId; - private final Date expectedLastInteractionDate; - private final String expectedLastInteraction; - public SessionTest(Session session, String guid, String expectedClientAddress, String expectedClientMachine, String expectedClientVersion, int expectedClientPort, Date expectedCreationDate, String expectedUserId, Date expectedLastInteractionDate, String expectedLastInteraction) { + public SessionTest(Session session, String guid, String expectedClientAddress, String expectedClientMachine, String expectedClientVersion, int expectedClientPort, Date expectedCreationDate, String expectedUserId) { this.session = session; this.expectedGuid = guid; this.expectedClientAddress = expectedClientAddress; @@ -49,8 +47,6 @@ public class SessionTest { this.expectedClientPort = expectedClientPort; this.expectedCreationDate = expectedCreationDate; this.expectedUserId = expectedUserId; - this.expectedLastInteractionDate = expectedLastInteractionDate; - this.expectedLastInteraction = expectedLastInteraction; } @Test @@ -103,26 +99,6 @@ public class SessionTest { Assert.assertEquals(newValue, session.getClientPort()); } - @Test - public void testSetGetLastInteractionDate() throws Exception { - Date newValue = new Date(); - - Assert.assertEquals(expectedLastInteractionDate, session.getLastInteractionDate()); - - session.setLastInteractionDate(newValue); - Assert.assertEquals(newValue, session.getLastInteractionDate()); - } - - @Test - public void testSetGetLastInteractionDetails() throws Exception { - String newValue = GUID.create(); - - Assert.assertEquals(expectedLastInteraction, session.getLastInteractionDetails()); - - session.setLastInteractionDetails(newValue); - Assert.assertEquals(newValue, session.getLastInteractionDetails()); - } - @Parameters public static Collection<Object[]> getData() { Collection<Object[]> data = new ArrayList<Object[]>(); @@ -134,12 +110,9 @@ public class SessionTest { int clientPort = index * 345; Date creationDate = new Date(); String userId = "userId-" + index; - Date lastInteractionDate = new Date(); - String lastInteraction = "lastInteraction-" + index; Session session = - new Session(guid, userId, creationDate, clientVersion, clientMachine, clientAddress, clientPort, - lastInteractionDate, lastInteraction); + new Session(guid, userId, creationDate, clientVersion, clientMachine, clientAddress, clientPort); data.add(new Object[] { session, @@ -149,9 +122,9 @@ public class SessionTest { clientVersion, clientPort, creationDate, - userId, - lastInteractionDate, - lastInteraction}); + userId + + }); } return data; } |