@Test public void testValidStringNo() throws PersistenceLayerException { assertNull(fd.getFactSetName()); assertNull(fd.getUsableLocation()); assertTrue(token.parseToken(context, fd, "DOMAIN|Caster").passed()); assertNotNull(fd.getFactSetName()); assertNotNull(fd.getUsableLocation()); assertEquals("Caster", fd.getFactSetName()); assertEquals(Domain.class, fd.getUsableLocation()); String[] unparsed = token.unparse(context, fd); assertNotNull(unparsed); assertEquals(1, unparsed.length); assertEquals("DOMAIN|Caster", unparsed[0]); }
@Test public void testValidStringString() throws PersistenceLayerException { assertNull(fd.getFactSetName()); assertNull(fd.getUsableLocation()); assertTrue(token.parseToken(context, fd, "SKILL|Possibility").passed()); assertNotNull(fd.getFactSetName()); assertNotNull(fd.getUsableLocation()); assertEquals("Possibility", fd.getFactSetName()); assertEquals(Skill.class, fd.getUsableLocation()); String[] unparsed = token.unparse(context, fd); assertNotNull(unparsed); assertEquals(1, unparsed.length); assertEquals("SKILL|Possibility", unparsed[0]); }