From b4d54d687cf222d846f0fda8100dcd298884100e Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 31 Dec 2020 13:55:05 -0800 Subject: [PATCH] Added additional test case for weapons using string primary key --- core/src/test/java/com/riiablo/table/TablesTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/test/java/com/riiablo/table/TablesTest.java b/core/src/test/java/com/riiablo/table/TablesTest.java index b056ac67..654c0d49 100644 --- a/core/src/test/java/com/riiablo/table/TablesTest.java +++ b/core/src/test/java/com/riiablo/table/TablesTest.java @@ -65,6 +65,16 @@ public class TablesTest extends RiiabloTest { Assert.assertEquals("ReturnedArcher", record.NameStr); } + @Test + public void weapons_primary_key() { + FileHandle handle = Gdx.files.internal("test/weapons.txt"); + TsvParser parser = TsvParser.parse(handle.readBytes()); + TableManifest.weapons.parser = null; + WeaponsTable table = Tables.loadTsv(TableManifest.weapons, parser); + Assert.assertNotNull(table.get(54)); + Assert.assertNotNull(table.get("BRN")); + } + @Test public void weapons_superclass_access() { FileHandle handle = Gdx.files.internal("test/weapons.txt");