MCPcopy Create free account
hub / github.com/PCGen/pcgen / testDirect

Method testDirect

code/src/itest/tokencontent/SpellClassesTest.java:65–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 }
64
65 @Test
66 public void testDirect()
67 {
68 ParseResult result = token.parseToken(context, sp, "Dragon=1");
69 if (result != ParseResult.SUCCESS)
70 {
71 result.printMessages(TestURI.getURI());
72 fail("Test Setup Failed");
73 }
74 finishLoad();
75 classFacet.addClass(id, dragon);
76 classFacet.setLevel(id, dragon, 1);
77 //Right now this is done in PCClass
78 FacetLibrary.getFacet(SpellListFacet.class).add(id, dragon.get(ObjectKey.CLASS_SPELLLIST), dragon);
79 pc.setDirty(true);
80 HashMapToList<CDOMList<Spell>, Integer> map = availableSpellFacet.getSpellLevelInfo(id, sp);
81 assertTrue(map.containsListFor(dragon.get(ObjectKey.CLASS_SPELLLIST)));
82 assertEquals(1, map.getListFor(dragon.get(ObjectKey.CLASS_SPELLLIST)).size());
83 assertEquals(1, map.getListFor(dragon.get(ObjectKey.CLASS_SPELLLIST)).get(0).intValue());
84 }
85
86 @Override
87 public CDOMToken<?> getToken()

Callers

nothing calls this directly

Calls 15

printMessagesMethod · 0.95
getURIMethod · 0.95
getFacetMethod · 0.95
failMethod · 0.80
intValueMethod · 0.80
parseTokenMethod · 0.65
addMethod · 0.65
getMethod · 0.65
containsListForMethod · 0.65
sizeMethod · 0.65
getListForMethod · 0.65
finishLoadMethod · 0.45

Tested by

no test coverage detected