From: <pb...@us...> - 2011-10-27 14:20:31
|
Revision: 18970 http://jmri.svn.sourceforge.net/jmri/?rev=18970&view=rev Author: pbender Date: 2011-10-27 14:20:25 +0000 (Thu, 27 Oct 2011) Log Message: ----------- add test for operations server Modified Paths: -------------- trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleServerTest.java Added Paths: ----------- trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleOperationsServerTest.java Added: trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleOperationsServerTest.java =================================================================== --- trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleOperationsServerTest.java (rev 0) +++ trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleOperationsServerTest.java 2011-10-27 14:20:25 UTC (rev 18970) @@ -0,0 +1,46 @@ +//SimpleOperationsServerTest.java + +package jmri.jmris.simpleserver; + +import junit.framework.Assert; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Tests for the jmri.jmris.simpleserver.SimpleOperationsServer class + * @author Paul Bender + * @version $Revision: 17977 $ + */ +public class SimpleOperationsServerTest extends TestCase { + + public void testCtor() { + java.io.DataOutputStream output=new java.io.DataOutputStream(System.out); + java.io.DataInputStream input = new java.io.DataInputStream(System.in); + SimpleOperationsServer a = new SimpleOperationsServer(input,output); + Assert.assertNotNull(a); + } + + // from here down is testing infrastructure + + public SimpleOperationsServerTest(String s) { + super(s); + } + + // Main entry point + static public void main(String[] args) { + String[] testCaseName = {SimpleOperationsServerTest.class.getName()}; + junit.swingui.TestRunner.main(testCaseName); + } + + // test suite from all defined tests + public static Test suite() { + TestSuite suite = new TestSuite(jmri.jmris.simpleserver.SimpleOperationsServerTest.class); + + return suite; + } + + static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(SimpleOperationsServerTest.class.getName()); + +} + Modified: trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleServerTest.java =================================================================== --- trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleServerTest.java 2011-10-27 14:05:33 UTC (rev 18969) +++ trunk/jmri/java/test/jmri/jmris/simpleserver/SimpleServerTest.java 2011-10-27 14:20:25 UTC (rev 18970) @@ -45,6 +45,7 @@ suite.addTest(jmri.jmris.simpleserver.SimpleReporterServerTest.suite()); suite.addTest(jmri.jmris.simpleserver.SimpleSensorServerTest.suite()); suite.addTest(jmri.jmris.simpleserver.SimpleLightServerTest.suite()); + suite.addTest(jmri.jmris.simpleserver.SimpleOperationsServerTest.suite()); if (!System.getProperty("jmri.headlesstest","false").equals("true")) { // put any tests that require a UI here. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |