Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<path id="project.class.path">
<pathelement location="." />
<pathelement location="lib/junit.jar" />
<pathelement location="lib/junit-4.12.jar" />
<pathelement location="lib/xercesImpl.jar" /> <!-- only needed for tests compile and run -->
<pathelement location="lib/mockito-core-2.2.9-javadoc.jar" /> <!-- only needed for tests compile and run -->
<pathelement location="lib/mockito-core-2.2.9.jar" /> <!-- only needed for tests compile and run -->
Expand Down Expand Up @@ -134,6 +134,7 @@
debug="yes" >
<!-- <compilerarg value="-Xlint:{fallthrough,path,finally,-unchecked,-serial} "/> -->
<!-- <compilerarg value="-Xlint:unchecked" /> -->
<compilerarg value="-Xmaxerrs"/><compilerarg value="1000"/><!-- change from default 100 errors -->
<classpath refid="project.class.path" />
</javac>
</target>
Expand All @@ -153,6 +154,7 @@
memorymaximumsize="256m"
deprecation="${deprecation}"
debug="yes" >
<compilerarg value="-Xmaxerrs"/><compilerarg value="1000"/><!-- change from default 100 errors -->
<classpath refid="project.class.path" />
</javac>
</target>
Expand Down
Binary file added lib/junit-4.12.jar
Binary file not shown.
Binary file removed lib/junit.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion test/AllTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public AllTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {AllTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
34 changes: 34 additions & 0 deletions test/org/openlcb/CommonIdentifiersTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package org.openlcb;

import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import java.awt.GraphicsEnvironment;
import org.openlcb.*;

/**
*
* @author Paul Bender Copyright (C) 2017
*/
public class CommonIdentifiersTest {

@Test
public void testCTor() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
CommonIdentifiers t = new CommonIdentifiers();
Assert.assertNotNull("exists",t);
}

// The minimal setup for log4J
@Before
public void setUp() {
}

@After
public void tearDown() {
}

}
2 changes: 1 addition & 1 deletion test/org/openlcb/ConfigurationPortalTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ConfigurationPortalTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {ConfigurationPortalTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/ConsumerIdentifiedMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ConsumerIdentifiedMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {ConsumerIdentifiedMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
34 changes: 34 additions & 0 deletions test/org/openlcb/DatagramAcknowledgedMessageTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package org.openlcb;

import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.openlcb.*;

/**
*
* @author Paul Bender Copyright (C) 2017
*/
public class DatagramAcknowledgedMessageTest {

@Test
public void testCTor() {
NodeID id1 = new NodeID(new byte[]{1, 1, 0, 0, 0, 4});
NodeID id2 = new NodeID(new byte[]{1, 1, 0, 0, 4, 4});
DatagramAcknowledgedMessage t = new DatagramAcknowledgedMessage(id1,id2);
Assert.assertNotNull("exists",t);
}

// The minimal setup for log4J
@Before
public void setUp() {
}

@After
public void tearDown() {
}

}
2 changes: 1 addition & 1 deletion test/org/openlcb/DatagramMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public DatagramMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {DatagramMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
34 changes: 34 additions & 0 deletions test/org/openlcb/DatagramRejectedMessageTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package org.openlcb;

import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.openlcb.*;

/**
*
* @author Paul Bender Copyright (C) 2017
*/
public class DatagramRejectedMessageTest {

@Test
public void testCTor() {
NodeID id1 = new NodeID(new byte[]{1, 1, 0, 0, 0, 4});
NodeID id2 = new NodeID(new byte[]{1, 1, 0, 0, 4, 4});
DatagramRejectedMessage t = new DatagramRejectedMessage(id1,id2,1);
Assert.assertNotNull("exists",t);
}

// The minimal setup for log4J
@Before
public void setUp() {
}

@After
public void tearDown() {
}

}
34 changes: 34 additions & 0 deletions test/org/openlcb/DefaultPropertyListenerSupportTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package org.openlcb;

import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import java.awt.GraphicsEnvironment;
import org.openlcb.*;

/**
*
* @author Paul Bender Copyright (C) 2017
*/
public class DefaultPropertyListenerSupportTest {

@Test
public void testCTor() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
DefaultPropertyListenerSupport t = new DefaultPropertyListenerSupport();
Assert.assertNotNull("exists",t);
}

// The minimal setup for log4J
@Before
public void setUp() {
}

@After
public void tearDown() {
}

}
2 changes: 1 addition & 1 deletion test/org/openlcb/EventIDTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public EventIDTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {EventIDTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/GatewayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public GatewayTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {GatewayTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/IdentifyConsumersMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public IdentifyConsumersMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {IdentifyConsumersMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/IdentifyEventsMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public IdentifyEventsMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {IdentifyEventsMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/IdentifyProducersMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public IdentifyProducersMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {IdentifyProducersMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/InitializationCompleteMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public InitializationCompleteMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {InitializationCompleteMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/LearnEventMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public LearnEventMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {LearnEventMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/LoaderClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public LoaderClientTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {LoaderClientTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/MessageDecoderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public MessageDecoderTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {MessageDecoderTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/MessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public MessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {MessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/MessageTypeIdentifierTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public MessageTypeIdentifierTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {MessageTypeIdentifierTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/MimicNodeStoreTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public MimicNodeStoreTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {MimicNodeStoreTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/NodeIDTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public NodeIDTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {NodeIDTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
2 changes: 1 addition & 1 deletion test/org/openlcb/NodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public NodeTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {NodeTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
37 changes: 37 additions & 0 deletions test/org/openlcb/OlcbInterfaceTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.openlcb;

import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.openlcb.*;

/**
*
* @author Paul Bender Copyright (C) 2017
*/
public class OlcbInterfaceTest {

@Test
public void testCTor() {
NodeID nodeID = new NodeID(new byte[]{1,2,3,4,5,6});
Connection testConnection = new AbstractConnection(){
public void put(Message msg, Connection node) {
}
};
OlcbInterface t = new OlcbInterface(nodeID,testConnection);
Assert.assertNotNull("exists",t);
}

// The minimal setup for log4J
@Before
public void setUp() {
}

@After
public void tearDown() {
}

}
2 changes: 1 addition & 1 deletion test/org/openlcb/OptionalIntRejectedMessageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public OptionalIntRejectedMessageTest(String s) {
// Main entry point
static public void main(String[] args) {
String[] testCaseName = {OptionalIntRejectedMessageTest.class.getName()};
junit.swingui.TestRunner.main(testCaseName);
junit.textui.TestRunner.main(testCaseName);
}

// test suite from all defined tests
Expand Down
Loading