Created ArmType schema and table test

This commit is contained in:
Collin Smith 2021-01-08 17:16:25 -08:00
parent beebd4378f
commit c2b7bb20e6
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package com.riiablo.table.schema;
import com.riiablo.table.annotation.PrimaryKey;
import com.riiablo.table.annotation.Schema;
@Schema
public class ArmType {
@Override
public String toString() {
return Name;
}
@PrimaryKey
public String Token;
public String Name;
}

View File

@ -22,6 +22,7 @@ import com.riiablo.table.schema.RarePrefix;
import com.riiablo.table.schema.RareSuffix;
import com.riiablo.table.schema.Sounds;
import com.riiablo.table.schema.Weapons;
import com.riiablo.table.table.ArmTypeTable;
import com.riiablo.table.table.BodyLocsTable;
import com.riiablo.table.table.ItemStatCostTable;
import com.riiablo.table.table.MagicPrefixTable;
@ -425,4 +426,15 @@ public class TablesTest extends RiiabloTest {
Assert.assertEquals("TRAMPLE", table.get(106).name);
Assert.assertEquals("FLANGE", table.get(154).name);
}
@Test
public void armtype() {
LogManager.setLevel("com.riiablo.table.table.ArmTypeTable", Level.TRACE);
TableManifest.armtype.parser = null;
FileHandle handle = Gdx.files.internal("test/armtype.txt");
ArmTypeTable table = Tables.loadTsv(TableManifest.armtype, handle);
Assert.assertEquals("LIT", table.get(0).Token);
Assert.assertEquals("MED", table.get(1).Token);
Assert.assertEquals("HVY", table.get(2).Token);
}
}