From 7e0339b14310237dba58e0119c134a782beed27d Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Wed, 8 Dec 2021 12:35:34 +0100 Subject: - Completed version3 asn1 level unit tests - Added missing default values --- src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java | 2 ++ src/main/java/org/uic/barcode/ticket/api/asn/omv3/FIPTicketData.java | 2 ++ .../org/uic/barcode/ticket/api/asn/omv3/SequenceOfActivatedDays.java | 1 + .../java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfPlaceNum.java | 1 + .../org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java | 1 + .../org/uic/barcode/ticket/api/asn/omv3/SequenceOfTransportTypes.java | 1 + .../java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTravelerId.java | 1 + src/main/java/org/uic/barcode/ticket/api/asn/omv3/VoucherData.java | 2 ++ 14 files changed, 23 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java index 579342e..c7d0557 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java @@ -125,6 +125,7 @@ public class CountermarkData extends Object { @FieldOrder(order = 22) @IntRange(minValue=-1,maxValue=700) + @Asn1Default(value="0") @Asn1Optional public Long validFromDay; @FieldOrder(order = 22) @@ -137,6 +138,7 @@ public class CountermarkData extends Object { @FieldOrder(order = 24) @IntRange(minValue=0,maxValue=370) + @Asn1Default(value="0") @Asn1Optional public Long validUntilDay; @FieldOrder(order = 25) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java index fc5523c..ef425aa 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java @@ -23,6 +23,7 @@ import java.util.Calendar; import java.util.Date; import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; import org.uic.barcode.asn1.datatypes.Asn1Optional; import org.uic.barcode.asn1.datatypes.CharacterRestriction; import org.uic.barcode.asn1.datatypes.FieldOrder; @@ -58,6 +59,7 @@ public class CustomerCardData extends Object { @FieldOrder(order = 5) @IntRange(minValue=0,maxValue=250) + @Asn1Default(value="0") @Asn1Optional public Long validUntilYear; @FieldOrder(order = 6) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java index bb0d273..b1cc30c 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java @@ -67,10 +67,12 @@ public class FIPTicketData extends Object { @FieldOrder(order = 6) @IntRange(minValue=-1,maxValue=700) + @Asn1Default(value="0") @Asn1Optional public Long validFromDay; @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=370) + @Asn1Default(value="0") @Asn1Optional public Long validUntilDay; @FieldOrder(order = 8) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java index 701b076..63f9292 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java @@ -97,6 +97,7 @@ public class PassData extends Object { /** The valid from day. */ @FieldOrder(order = 9) @IntRange(minValue=-1,maxValue=700) + @Asn1Default(value="0") @Asn1Optional public Long validFromDay; /** The valid from time. */ @@ -112,6 +113,7 @@ public class PassData extends Object { /** The valid until day. */ @FieldOrder(order = 12) @IntRange(minValue=0,maxValue=370) + @Asn1Default(value="0") @Asn1Optional public Long validUntilDay; /** The valid until time. */ diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java index ab9eaea..6b1d5e1 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java @@ -23,6 +23,7 @@ import java.util.Calendar; import java.util.Date; import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; import org.uic.barcode.asn1.datatypes.Asn1Optional; import org.uic.barcode.asn1.datatypes.CharacterRestriction; import org.uic.barcode.asn1.datatypes.FieldOrder; @@ -78,6 +79,7 @@ public class VoucherData extends Object { public Long validUntilDay; @FieldOrder(order = 10) + @Asn1Default(value="0") @Asn1Optional public Long value; @FieldOrder(order = 11) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java index 510ec6f..b469e55 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java @@ -125,6 +125,7 @@ public class CountermarkData extends Object { @FieldOrder(order = 22) @IntRange(minValue=-367,maxValue=700) + @Asn1Default(value = "0") @Asn1Optional public Long validFromDay; @FieldOrder(order = 23) @@ -137,6 +138,7 @@ public class CountermarkData extends Object { @FieldOrder(order = 25) @IntRange(minValue=-1,maxValue=370) + @Asn1Default(value = "0") @Asn1Optional public Long validUntilDay; @FieldOrder(order = 26) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java index e1c7963..3685a9a 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java @@ -23,6 +23,7 @@ import java.util.Calendar; import java.util.Date; import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; import org.uic.barcode.asn1.datatypes.Asn1Optional; import org.uic.barcode.asn1.datatypes.CharacterRestriction; import org.uic.barcode.asn1.datatypes.FieldOrder; @@ -58,6 +59,7 @@ public class CustomerCardData extends Object { @FieldOrder(order = 5) @IntRange(minValue=0,maxValue=250) + @Asn1Default("0") @Asn1Optional public Long validUntilYear; @FieldOrder(order = 6) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/FIPTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/FIPTicketData.java index 60d0005..37d80a2 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/FIPTicketData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/FIPTicketData.java @@ -67,10 +67,12 @@ public class FIPTicketData extends Object { @FieldOrder(order = 6) @IntRange(minValue=-367,maxValue=700) + @Asn1Default("0") @Asn1Optional public Long validFromDay; @FieldOrder(order = 7) @IntRange(minValue=-1,maxValue=370) + @Asn1Default("0") @Asn1Optional public Long validUntilDay; @FieldOrder(order = 8) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfActivatedDays.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfActivatedDays.java index 0dd12a1..f2c7835 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfActivatedDays.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfActivatedDays.java @@ -18,6 +18,7 @@ public class SequenceOfActivatedDays extends Asn1SequenceOf { } } + @Deprecated public static SequenceOfActivatedDays getSequence(List numList) { if (numList == null || numList.isEmpty()) return null; return new SequenceOfActivatedDays(numList); diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfPlaceNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfPlaceNum.java index 1a6dbfc..3780dc3 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfPlaceNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfPlaceNum.java @@ -20,6 +20,7 @@ public class SequenceOfPlaceNum extends Asn1SequenceOf { } } + @Deprecated public static SequenceOfPlaceNum getSequence(List numList) { if (numList == null || numList.isEmpty()) return null; return new SequenceOfPlaceNum(numList); diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java index 3048235..388392b 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java @@ -19,6 +19,7 @@ public class SequenceOfServiceBrands extends Asn1SequenceOf { } } + @Deprecated public static SequenceOfServiceBrands getSequence(List numList) { if (numList == null || numList.isEmpty()) return null; return new SequenceOfServiceBrands(numList); diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTransportTypes.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTransportTypes.java index edec045..934b5c9 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTransportTypes.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTransportTypes.java @@ -19,6 +19,7 @@ public class SequenceOfTransportTypes extends Asn1SequenceOf { } } + @Deprecated public static SequenceOfTransportTypes getSequence(List numList) { if (numList == null || numList.isEmpty()) return null; return new SequenceOfTransportTypes(numList); diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTravelerId.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTravelerId.java index 6808104..b04fcfa 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTravelerId.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTravelerId.java @@ -18,6 +18,7 @@ public class SequenceOfTravelerId extends Asn1SequenceOf { } } + @Deprecated public static SequenceOfTravelerId getSequence(List numList) { if (numList == null || numList.isEmpty()) return null; return new SequenceOfTravelerId(numList); diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/VoucherData.java index b867e40..761ed6b 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/VoucherData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/VoucherData.java @@ -23,6 +23,7 @@ import java.util.Calendar; import java.util.Date; import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; import org.uic.barcode.asn1.datatypes.Asn1Optional; import org.uic.barcode.asn1.datatypes.CharacterRestriction; import org.uic.barcode.asn1.datatypes.FieldOrder; @@ -78,6 +79,7 @@ public class VoucherData extends Object { public Long validUntilDay; @FieldOrder(order = 10) + @Asn1Default("0") @Asn1Optional public Long value; @FieldOrder(order = 11) -- cgit v1.2.3