diff --git a/pom.xml b/pom.xml index 3c66488..a31d6bf 100644 --- a/pom.xml +++ b/pom.xml @@ -104,10 +104,7 @@ http://download.oracle.com/javase/6/docs/api/ - http://static.springsource.org/spring/docs/3.0.x/javadoc-api/ http://slf4j.org/apidocs/ - http://jml.blathersource.org/javadocs/ - http://dustin.github.com/java-memcached-client/apidocs/ diff --git a/src/test/java/j8583/SimpleMessageTests.java b/src/test/java/j8583/TestIsoMessage.java similarity index 89% rename from src/test/java/j8583/SimpleMessageTests.java rename to src/test/java/j8583/TestIsoMessage.java index b150cef..8b912e2 100644 --- a/src/test/java/j8583/SimpleMessageTests.java +++ b/src/test/java/j8583/TestIsoMessage.java @@ -15,7 +15,7 @@ import com.solab.iso8583.MessageFactory; * * @author Enrique Zamudio */ -public class SimpleMessageTests { +public class TestIsoMessage { private MessageFactory mf; @@ -31,7 +31,7 @@ public class SimpleMessageTests { public void testCreation() { IsoMessage iso = mf.newMessage(0x200); assert iso.getType() == 0x200; - assert iso.getField(3).getType() == IsoType.NUMERIC && ((Number)iso.getObjectValue(3)).intValue() == 650000; + assert iso.getField(3).getType() == IsoType.NUMERIC && "650000".equals((String)iso.getObjectValue(3)); assert iso.getField(32).getType() == IsoType.LLVAR; assert iso.getField(35).getType() == IsoType.LLVAR; assert iso.getField(43).getType() == IsoType.ALPHA && ((String)iso.getObjectValue(43)).length() == 40; @@ -44,7 +44,7 @@ public class SimpleMessageTests { for (int i = 4; i < 32; i++) { assert !iso.hasField(i); } - for (int i = 36; i < 48; i++) { + for (int i = 36; i < 43; i++) { assert !iso.hasField(i); } for (int i = 50; i < 60; i++) { @@ -61,7 +61,7 @@ public class SimpleMessageTests { /** Parses a message from a file and checks the fields. */ @Test public void testParsing() throws IOException, ParseException { - InputStream ins = getClass().getResourceAsStream("example.txt"); + InputStream ins = getClass().getResourceAsStream("/parse1.txt"); byte[] buf = new byte[400]; int pos = 0; while (ins.available() > 0) {