Changeset 75 for trunk/src/test/java
- Timestamp:
- 07/02/13 11:50:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/test/java/omq/test/workspace/WorkspaceTest.java
r74 r75 20 20 @RunWith(value = Parameterized.class) 21 21 public class WorkspaceTest { 22 private String type; 22 23 private static Broker serverBroker; 23 24 private static Broker clientBroker1; 24 25 private static Broker clientBroker2; 26 private static RemoteWorkspaceImpl w1C1; 27 private static RemoteWorkspaceImpl w3C1; 28 private static RemoteWorkspaceImpl w1C2; 29 private static RemoteWorkspaceImpl w2C2; 25 30 private static String[] workspaces = { "w1", "w2", "w3" }; 26 31 private static RemoteWorkspace[] remoteWorks = new RemoteWorkspace[3]; … … 28 33 // In this case the Constructor acts as a server 29 34 public WorkspaceTest(String type) throws Exception { 35 this.type = type; 30 36 Properties env = new Properties(); 31 37 env.setProperty(ParameterQueue.USER_NAME, "guest"); … … 75 81 clientBroker2 = new Broker(env); 76 82 83 // Client 1 will subscribe to changes in the workspaces w1 and w3 84 w1C1 = new RemoteWorkspaceImpl(); 85 w3C1 = new RemoteWorkspaceImpl(); 86 87 clientBroker1.bind(workspaces[0], w1C1); 88 clientBroker1.bind(workspaces[2], w3C1); 89 90 // Client 2 will subscribe to changes in the workspaces w1 and w2 91 w1C2 = new RemoteWorkspaceImpl(); 92 w2C2 = new RemoteWorkspaceImpl(); 93 94 clientBroker2.bind(workspaces[0], w1C2); 95 clientBroker2.bind(workspaces[1], w2C2); 96 77 97 System.out.println("Client 1 & client2 started"); 78 98 } … … 85 105 @Test 86 106 public void test() throws Exception { 107 System.out.println("Starting test: " + type); 87 108 String expected = null; 88 109 String actual = null; 89 90 // Client 1 will subscribe to changes in the workspaces w1 and w391 RemoteWorkspaceImpl w1C1 = new RemoteWorkspaceImpl();92 RemoteWorkspaceImpl w3C1 = new RemoteWorkspaceImpl();93 94 clientBroker1.bind(workspaces[0], w1C1);95 clientBroker1.bind(workspaces[2], w3C1);96 97 // Client 2 will subscribe to changes in the workspaces w1 and w298 RemoteWorkspaceImpl w1C2 = new RemoteWorkspaceImpl();99 RemoteWorkspaceImpl w2C2 = new RemoteWorkspaceImpl();100 101 clientBroker2.bind(workspaces[0], w1C2);102 clientBroker2.bind(workspaces[2], w2C2);103 110 104 111 // The server will notify a change in the w2
Note: See TracChangeset
for help on using the changeset viewer.