diff options
3 files changed, 37 insertions, 4 deletions
diff --git a/branches/sm-unittesting/Reprap_Custom_suite_c9d431a9.xml b/branches/sm-unittesting/Reprap_Custom_suite_c9d431a9.xml index 08b284ec..ffaebbed 100644 --- a/branches/sm-unittesting/Reprap_Custom_suite_c9d431a9.xml +++ b/branches/sm-unittesting/Reprap_Custom_suite_c9d431a9.xml @@ -8,6 +8,7 @@ </groups> <classes> <class name="org.reprap.geometry.polygons.PolygonTest"/> + <class name="org.reprap.machines.ReprapTest"/> </classes> </test> </suite> diff --git a/branches/sm-unittesting/src/org/reprap/comms/port/TestPort.java b/branches/sm-unittesting/src/org/reprap/comms/port/TestPort.java index 3d3848ad..34e19e13 100644 --- a/branches/sm-unittesting/src/org/reprap/comms/port/TestPort.java +++ b/branches/sm-unittesting/src/org/reprap/comms/port/TestPort.java @@ -3,11 +3,10 @@ package org.reprap.comms.port; import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.util.ArrayList;
import java.util.HashMap;
+import org.reprap.Device;
import org.reprap.comms.snap.SNAPAddress;
-import org.reprap.devices.TestDevice;
public class TestPort implements Port {
@@ -29,11 +28,11 @@ public class TestPort implements Port { }
/**
- * Called by a device to register itself on the TestPort
+ * Add a device onto the port
* @param device
* @param address
*/
- public void addDevice(TestDevice device, SNAPAddress address) {
+ public void addDevice(Device device, SNAPAddress address) {
deviceMap.put(address, device);
}
diff --git a/branches/sm-unittesting/src/org/reprap/machines/ReprapTest.java b/branches/sm-unittesting/src/org/reprap/machines/ReprapTest.java new file mode 100644 index 00000000..9fa0125a --- /dev/null +++ b/branches/sm-unittesting/src/org/reprap/machines/ReprapTest.java @@ -0,0 +1,33 @@ +package org.reprap.machines;
+
+import java.util.Properties;
+
+import org.reprap.Printer;
+import org.testng.Assert;
+
+public class ReprapTest {
+ private Printer printer;
+
+ /**
+ * @testng.configuration beforeSuite = "true"
+ */
+ public void setUp() throws Exception {
+ Properties props = new Properties();
+ props.setProperty("Geometry", "cartesian");
+ printer = MachineFactory.create();
+ }
+
+ /**
+ * @testng.configuration afterSuite = "true"
+ */
+ public void tearDown() {
+ printer.dispose();
+ }
+
+ /**
+ * @testng.test groups = "comms,all,all-offline"
+ */
+ public void testBasic() {
+ }
+
+}
|