diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2021-03-25 18:37:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 18:37:47 +0100 |
commit | 945963a8118dcf88fe53386df1d0c08c53e79bf9 (patch) | |
tree | cafd23ff62d39812466f1751af006d010548eca8 /src/org/uic/barcode/test/TicketLayoutTest.java | |
parent | Merge pull request #10 from UnionInternationalCheminsdeFer/time-zone-fix_2 (diff) | |
parent | - additional test on LayoutElement with utf-8 (diff) | |
download | UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.tar UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.tar.gz UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.tar.bz2 UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.tar.lz UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.tar.xz UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.tar.zst UIC-barcode-945963a8118dcf88fe53386df1d0c08c53e79bf9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/org/uic/barcode/test/TicketLayoutTest.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/org/uic/barcode/test/TicketLayoutTest.java b/src/org/uic/barcode/test/TicketLayoutTest.java index 089c87d..3d053e7 100644 --- a/src/org/uic/barcode/test/TicketLayoutTest.java +++ b/src/org/uic/barcode/test/TicketLayoutTest.java @@ -6,6 +6,7 @@ import java.io.IOException; import org.junit.Test;
import org.uic.barcode.staticFrame.UTLAYDataRecord;
+import org.uic.barcode.staticFrame.ticketLayoutBarcode.LayoutElement;
import org.uic.barcode.staticFrame.ticketLayoutBarcode.TicketLayout;
import org.uic.barcode.test.utils.SimpleTestTicketLayout;
import org.uic.barcode.test.utils.TestUtils;
@@ -40,6 +41,32 @@ public class TicketLayoutTest { assertEquals(tl1.toString(),tl2.toString());
+ compare(layout, tl2.getLayout());
+
+ }
+
+ public static void compare(TicketLayout layout1, TicketLayout layout2) {
+
+ assert(layout1.getLayoutStandard().equals(layout2.getLayoutStandard()));
+
+ for (LayoutElement e1: layout1.getElements() ) {
+
+ for (LayoutElement e2 :layout2.getElements()) {
+
+ boolean found = false;
+ if (e1.getLine() == e2.getLine() && e1.getColumn() == e2.getColumn()) {
+ found = true;
+ assert(e1.getText().equals(e2.getText()));
+ }
+ assert(found == true);
+
+ }
+
+ }
+
}
+
+
+
}
|