summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/uic/barcode/ticket/api/test/AsnLevelStationPassageTestV3.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/java/org/uic/barcode/ticket/api/test/AsnLevelStationPassageTestV3.java (renamed from src/test/java/org/uic/barcode/ticket/api/test/CountermarkComplexTestV3.java)62
1 files changed, 23 insertions, 39 deletions
diff --git a/src/test/java/org/uic/barcode/ticket/api/test/CountermarkComplexTestV3.java b/src/test/java/org/uic/barcode/ticket/api/test/AsnLevelStationPassageTestV3.java
index 86495f0..a1496c8 100644
--- a/src/test/java/org/uic/barcode/ticket/api/test/CountermarkComplexTestV3.java
+++ b/src/test/java/org/uic/barcode/ticket/api/test/AsnLevelStationPassageTestV3.java
@@ -8,7 +8,7 @@ import org.junit.Before;
import org.junit.Test;
import org.uic.barcode.asn1.uper.UperEncoder;
import org.uic.barcode.ticket.api.asn.omv3.UicRailTicketData;
-import org.uic.barcode.ticket.api.test.testtickets.CountermarkTestComplexTicketV3;
+import org.uic.barcode.ticket.api.test.testtickets.StationPassageTestTicketV3;
/**
@@ -17,7 +17,7 @@ import org.uic.barcode.ticket.api.test.testtickets.CountermarkTestComplexTicketV
*
*
*/
-public class CountermarkComplexTestV3 {
+public class AsnLevelStationPassageTestV3 {
@@ -49,6 +49,21 @@ public class CountermarkComplexTestV3 {
TimeZone.setDefault(defaulttimeZone);
}
+ @Test public void encoding() throws IllegalArgumentException, IllegalAccessException, ParseException {
+
+ //get tickets
+ ticket = StationPassageTestTicketV3.getUicTestTicket();
+ byte[] encoded = UperEncoder.encode(ticket);
+
+ assert(encoded != null);
+ assert(encoded.length > 20);
+
+ String encodedHex = UperEncoder.hexStringFromBytes(encoded);
+ String expectedHex = StationPassageTestTicketV3.getEncodingHex();
+
+ assert(expectedHex.equals(encodedHex));
+
+ }
/**
* Test encode test tickets in UTC and decode in CET.
@@ -60,52 +75,21 @@ public class CountermarkComplexTestV3 {
@Test public void decoding() {
//get tickets
- String hex = CountermarkTestComplexTicketV3.getEncodingHex();
+ String hex = StationPassageTestTicketV3.getEncodingHex();
byte[] content = UperEncoder.bytesFromHexString(hex);
ticket = UperEncoder.decode(content, UicRailTicketData.class);
assert(ticket != null);
-
- }
- @Test public void encoding() throws IllegalArgumentException, IllegalAccessException, ParseException {
-
- //get tickets
- String hex = CountermarkTestComplexTicketV3.getEncodingHex();
- byte[] content = UperEncoder.bytesFromHexString(hex);
- ticket = UperEncoder.decode(content, UicRailTicketData.class);
-
-
- //ticket = OpenTestComplexTicketV2.getUicTestTicket();
byte[] encoded = UperEncoder.encode(ticket);
-
-
-
- assert(encoded != null);
- assert(encoded.length > 20);
-
String encodedHex = UperEncoder.hexStringFromBytes(encoded);
- String expectedHex = CountermarkTestComplexTicketV3.getEncodingHex();
+ String expectedHex = StationPassageTestTicketV3.getEncodingHex();
assert(expectedHex.equals(encodedHex));
+
- }
+ }
+
- @Test public void encodingDecoding() throws IllegalArgumentException, IllegalAccessException, ParseException {
-
- //get tickets
- ticket = CountermarkTestComplexTicketV3.getUicTestTicket();
- byte[] encoded = UperEncoder.encode(ticket);
-
-
-
- assert(encoded != null);
- assert(encoded.length > 20);
-
- String encodedHex = UperEncoder.hexStringFromBytes(encoded);
- String expectedHex = CountermarkTestComplexTicketV3.getEncodingHex();
-
- assert(expectedHex.equals(encodedHex));
-
- }
+
}