diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/java/org/uic/barcode/test/utils/DynamicTestContent.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/java/org/uic/barcode/test/utils/DynamicTestContent.java b/src/test/java/org/uic/barcode/test/utils/DynamicTestContent.java new file mode 100644 index 0000000..9380372 --- /dev/null +++ b/src/test/java/org/uic/barcode/test/utils/DynamicTestContent.java @@ -0,0 +1,40 @@ +package org.uic.barcode.test.utils;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.util.Date;
+
+import org.uic.barcode.dynamicContent.api.IUicDynamicContent;
+import org.uic.barcode.dynamicContent.api.SimpleUicDynamicContent;
+import org.uic.barcode.ticket.api.impl.SimpleGeoCoordinate;
+import org.uic.barcode.ticket.api.spec.IGeoCoordinate;
+
+public class DynamicTestContent {
+
+ public static byte[] passIdHash = "PassId".getBytes();
+ public static byte[] phoneIdHash = "myPhone".getBytes();
+
+
+ public static IUicDynamicContent createDynamicTestContent() {
+
+ IUicDynamicContent dc = new SimpleUicDynamicContent();
+ dc.setChallengeString("CHALLENGE");
+ dc.setAppId("MyApp");
+ dc.setPhoneIdHash(phoneIdHash);
+ dc.setPassIdHash(passIdHash);
+
+ ZonedDateTime timeStamp = ZonedDateTime.now(ZoneId.of("UTC"));
+
+ dc.setTimeStamp(Date.from(timeStamp.toInstant()));
+
+ IGeoCoordinate geo = new SimpleGeoCoordinate();
+ geo.setLatitude(123456L);
+ geo.setLongitude(23456L);
+ dc.setGeoCoordinate(geo);
+
+ return dc;
+ }
+
+
+
+}
|