Added additional test case for weapons using string primary key

This commit is contained in:
Collin Smith 2020-12-31 13:55:05 -08:00
parent e0d4884b96
commit b4d54d687c

View File

@ -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");