Skip to content
Snippets Groups Projects
Commit bc0ce45c authored by Oliver Rieger's avatar Oliver Rieger
Browse files

gui jupiter test modified.

parent 0e408a1f
Branches
Tags
No related merge requests found
...@@ -3,6 +3,7 @@ package de.fu_berlin.inf.dpp.test.jupiter; ...@@ -3,6 +3,7 @@ package de.fu_berlin.inf.dpp.test.jupiter;
import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.DeleteOperation; import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.DeleteOperation;
import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation; import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation;
import de.fu_berlin.inf.dpp.net.JID; import de.fu_berlin.inf.dpp.net.JID;
import de.fu_berlin.inf.dpp.test.jupiter.server.impl.ConcurrentManager;
import de.fu_berlin.inf.dpp.test.jupiter.text.ClientSynchronizedDocument; import de.fu_berlin.inf.dpp.test.jupiter.text.ClientSynchronizedDocument;
import de.fu_berlin.inf.dpp.test.jupiter.text.JupiterTestCase; import de.fu_berlin.inf.dpp.test.jupiter.text.JupiterTestCase;
import de.fu_berlin.inf.dpp.test.jupiter.text.ServerSynchronizedDocument; import de.fu_berlin.inf.dpp.test.jupiter.text.ServerSynchronizedDocument;
...@@ -42,7 +43,9 @@ public class DOptPuzzleTest extends JupiterTestCase{ ...@@ -42,7 +43,9 @@ public class DOptPuzzleTest extends JupiterTestCase{
network,jid_c2); network,jid_c2);
ClientSynchronizedDocument c3 = new ClientSynchronizedDocument("abcd", ClientSynchronizedDocument c3 = new ClientSynchronizedDocument("abcd",
network,jid_c3); network,jid_c3);
ServerSynchronizedDocument s1 = new ServerSynchronizedDocument( // ServerSynchronizedDocument s1 = new ServerSynchronizedDocument(
// network,jid_server);
ConcurrentManager s1 = new ConcurrentManager(
network,jid_server); network,jid_server);
/* connect all with simulated network. */ /* connect all with simulated network. */
......
...@@ -12,6 +12,7 @@ import de.fu_berlin.inf.dpp.concurrent.jupiter.Operation; ...@@ -12,6 +12,7 @@ import de.fu_berlin.inf.dpp.concurrent.jupiter.Operation;
import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.DeleteOperation; import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.DeleteOperation;
import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation; import de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation;
import de.fu_berlin.inf.dpp.net.JID; import de.fu_berlin.inf.dpp.net.JID;
import de.fu_berlin.inf.dpp.test.jupiter.server.impl.ConcurrentManager;
import de.fu_berlin.inf.dpp.test.jupiter.text.ClientSynchronizedDocument; import de.fu_berlin.inf.dpp.test.jupiter.text.ClientSynchronizedDocument;
import de.fu_berlin.inf.dpp.test.jupiter.text.JupiterDocumentListener; import de.fu_berlin.inf.dpp.test.jupiter.text.JupiterDocumentListener;
import de.fu_berlin.inf.dpp.test.jupiter.text.ServerSynchronizedDocument; import de.fu_berlin.inf.dpp.test.jupiter.text.ServerSynchronizedDocument;
...@@ -41,7 +42,7 @@ public class JupiterTestUI extends javax.swing.JPanel { ...@@ -41,7 +42,7 @@ public class JupiterTestUI extends javax.swing.JPanel {
initListener(); initListener();
jupiter = new JupiterSimulater(); jupiter = new JupiterSimulater();
jupiter.deactiveSide3(); // jupiter.deactiveSide3();
} }
public void update() { public void update() {
...@@ -942,7 +943,8 @@ public class JupiterTestUI extends javax.swing.JPanel { ...@@ -942,7 +943,8 @@ public class JupiterTestUI extends javax.swing.JPanel {
protected ClientSynchronizedDocument c1; protected ClientSynchronizedDocument c1;
protected ClientSynchronizedDocument c2; protected ClientSynchronizedDocument c2;
protected ClientSynchronizedDocument c3; protected ClientSynchronizedDocument c3;
protected ServerSynchronizedDocument s1; // protected ServerSynchronizedDocument s1;
protected ConcurrentManager s1;
JID jid_c1; JID jid_c1;
JID jid_c2; JID jid_c2;
...@@ -953,12 +955,12 @@ public class JupiterTestUI extends javax.swing.JPanel { ...@@ -953,12 +955,12 @@ public class JupiterTestUI extends javax.swing.JPanel {
// deactiveSide3(); // deactiveSide3();
} }
public void deactiveSide3() { // public void deactiveSide3() {
network.removeClient(c3); // network.removeClient(c3);
s1.removeProxyClient(jid_c3); // s1.removeProxyClient(jid_c3);
jPanel3.setVisible(false); // jPanel3.setVisible(false);
update(); // update();
} // }
private void init() { private void init() {
...@@ -978,8 +980,9 @@ public class JupiterTestUI extends javax.swing.JPanel { ...@@ -978,8 +980,9 @@ public class JupiterTestUI extends javax.swing.JPanel {
c3 = new ClientSynchronizedDocument(jTextFieldInitialState c3 = new ClientSynchronizedDocument(jTextFieldInitialState
.getText(), network, jid_c3); .getText(), network, jid_c3);
c3.addJupiterDocumentListener(this); c3.addJupiterDocumentListener(this);
s1 = new ServerSynchronizedDocument(jTextFieldInitialState // s1 = new ServerSynchronizedDocument(jTextFieldInitialState
.getText(), network, jid_server); // .getText(), network, jid_server);
s1 = new ConcurrentManager( network, jid_server);
network.addClient(c1); network.addClient(c1);
network.addClient(c2); network.addClient(c2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment