/******************************************************************************* * 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.infrastructure; import java.net.InetAddress; import junit.framework.*; /** * The class <code>NodeManagerTest</code> contains tests for the class <code>{@link NodeManager}</code>. * * @generatedBy CodePro at 18/10/13 19:04 * @author rc3011 * @version $Revision: 1.0 $ */ public class NodeManagerTest extends TestCase { /** * Run the NodeManager(int,InetAddress,int) constructor test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testNodeManager_1() throws Exception { int bindPort = 1; InetAddress bindAddr = InetAddress.getLocalHost(); int ownPort = 1; NodeManager result = new NodeManager(bindPort, bindAddr, ownPort); // add additional test code here assertNotNull(result); } /** * Run the NodeManager(int,InetAddress,int) constructor test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testNodeManager_2() throws Exception { int bindPort = 1; InetAddress bindAddr = InetAddress.getLocalHost(); int ownPort = 1; NodeManager result = new NodeManager(bindPort, bindAddr, ownPort); // add additional test code here assertNotNull(result); } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_1() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_2() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_3() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_4() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_5() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_6() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_7() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_8() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_9() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_10() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_11() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_12() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_13() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_14() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_15() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void init() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testInit_16() throws Exception { NodeManager fixture = new NodeManager(1, InetAddress.getLocalHost(), 1); fixture.init(); // add additional test code here } /** * Run the void setSystemStable() method test. * * @throws Exception * * @generatedBy CodePro at 18/10/13 19:04 */ public void testSetSystemStable_1() throws Exception { NodeManager.setSystemStable(); // add additional test code here // An unexpected exception was thrown in user code while executing this test: // java.lang.NullPointerException // at uk.ac.imperial.lsds.seep.infrastructure.monitor.Monitor.send666(Monitor.java:54) // at uk.ac.imperial.lsds.seep.infrastructure.NodeManager.setSystemStable(NodeManager.java:80) } /** * Perform pre-test initialization. * * @throws Exception * if the initialization fails for some reason * * @see TestCase#setUp() * * @generatedBy CodePro at 18/10/13 19:04 */ 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:04 */ 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:04 */ public static void main(String[] args) { if (args.length == 0) { // Run all of the tests junit.textui.TestRunner.run(NodeManagerTest.class); } else { // Run only the named tests TestSuite suite = new TestSuite("Selected tests"); for (int i = 0; i < args.length; i++) { TestCase test = new NodeManagerTest(); test.setName(args[i]); suite.addTest(test); } junit.textui.TestRunner.run(suite); } } }