From 7af901fcc9f68ca2d876bf86878982fa22b1faf3 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 25 Feb 2024 16:19:33 +0800 Subject: [PATCH] added test data --- .../tech/iBeans/POSware/Lite/data_test.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/main/java/tech/iBeans/POSware/Lite/data_test.java b/src/main/java/tech/iBeans/POSware/Lite/data_test.java index 512c773..7386837 100644 --- a/src/main/java/tech/iBeans/POSware/Lite/data_test.java +++ b/src/main/java/tech/iBeans/POSware/Lite/data_test.java @@ -14,7 +14,7 @@ import java.util.Hashtable; public class data_test { public static Dictionary fake_items = new Hashtable<>(); - static { + private static void fill() { /* Fake items. */ Dictionary item_1 = new Hashtable<>(); item_1.put("Name", "No Discount"); @@ -22,9 +22,24 @@ public class data_test { fake_items.put("13f", item_1); Dictionary item_2 = new Hashtable<>(); - item_1.put("Name", "With Discount"); - item_1.put("Price", 1); - item_1.put("Discount", 0.95); - fake_items.put("13a", item_1); + item_2.put("Name", "a Discount"); + item_2.put("Price", 1); + item_2.put("Discount", -2); + fake_items.put("13a", item_2); + + Dictionary item_3 = new Hashtable<>(); + item_3.put("Name", "as Discount"); + item_3.put("Price", 1); + item_3.put("Discount", 95); + fake_items.put("13d", item_3); + + Dictionary item_4 = new Hashtable<>(); + item_4.put("Price", 1); + item_4.put("Discount", 0); + fake_items.put("1d", item_4); + } + + static { + fill(); }; }