added test data

This commit is contained in:
buzz-lightsnack-2007 2024-02-25 16:19:33 +08:00
parent f824201e4c
commit 7af901fcc9

View file

@ -14,7 +14,7 @@ import java.util.Hashtable;
public class data_test {
public static Dictionary<String, 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();
};
}