/******************************************************************************* * Copyright (c) 2014 Imperial College London * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Raul Castro Fernandez - initial API and implementation ******************************************************************************/ package uk.ac.imperial.lsds.seep.comm; import junit.framework.*; import uk.ac.imperial.lsds.seep.operator.OperatorStaticInformation; import uk.ac.imperial.lsds.seep.infrastructure.master.Node; import uk.ac.imperial.lsds.seep.comm.serialization.ControlTuple; /** * The class <code>RuntimeCommunicationToolsTest</code> contains tests for the class <code>{@link RuntimeCommunicationTools}</code>. * * @generatedBy CodePro at 18/10/13 19:00 * @author rc3011 * @version $Revision: 1.0 $ */ public class RuntimeCommunicationToolsTest extends TestCase { /** * Run the RuntimeCommunicationTools() constructor test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testRuntimeCommunicationTools_1() throws Exception { RuntimeCommunicationTools result = new RuntimeCommunicationTools(); // add additional test code here assertNotNull(result); } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_1() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_2() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_3() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_4() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_5() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_6() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_7() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsg(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsg_8() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsg(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsg(RuntimeCommunicationTools.java:48) } /** * Run the void sendControlMsgWithoutACK(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsgWithoutACK_1() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsgWithoutACK(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsgWithoutACK(RuntimeCommunicationTools.java:78) } /** * Run the void sendControlMsgWithoutACK(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsgWithoutACK_2() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsgWithoutACK(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsgWithoutACK(RuntimeCommunicationTools.java:78) } /** * Run the void sendControlMsgWithoutACK(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsgWithoutACK_3() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsgWithoutACK(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsgWithoutACK(RuntimeCommunicationTools.java:78) } /** * Run the void sendControlMsgWithoutACK(OperatorStaticInformation,ControlTuple,int) method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:00 */ public void testSendControlMsgWithoutACK_4() throws Exception { RuntimeCommunicationTools fixture = new RuntimeCommunicationTools(); OperatorStaticInformation loc = new OperatorStaticInformation(1, 1, new Node(1), 1, 1, true); ControlTuple ct = new ControlTuple(); int socketId = 1; fixture.sendControlMsgWithoutACK(loc, ct, socketId); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at java.net.Socket.<init>(Socket.java:418) // at java.net.Socket.<init>(Socket.java:241) // at uk.ac.imperial.lsds.seep.comm.RuntimeCommunicationTools.sendControlMsgWithoutACK(RuntimeCommunicationTools.java:78) } /** * Perform pre-test initialization. * * @throws Exception * if the initialization fails for some reason * * @see TestCase#setUp() * * @generatedBy CodePro at 18/10/13 19:00 */ protected void setUp() throws Exception { super.setUp(); // add additional set up code here } /** * Perform post-test clean-up. * * @throws Exception * if the clean-up fails for some reason * * @see TestCase#tearDown() * * @generatedBy CodePro at 18/10/13 19:00 */ protected void tearDown() throws Exception { super.tearDown(); // Add additional tear down code here } /** * Launch the test. * * @param args the command line arguments * * @generatedBy CodePro at 18/10/13 19:00 */ public static void main(String[] args) { if (args.length == 0) { // Run all of the tests junit.textui.TestRunner.run(RuntimeCommunicationToolsTest.class); } else { // Run only the named tests TestSuite suite = new TestSuite("Selected tests"); for (int i = 0; i < args.length; i++) { TestCase test = new RuntimeCommunicationToolsTest(); test.setName(args[i]); suite.addTest(test); } junit.textui.TestRunner.run(suite); } } }