use of pcgen.cdom.enumeration.ListKey in project pcgen by PCGen.
the class DeityTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey objectKey = ListKey.DEITY;
primaryProf.addToListFor(objectKey, new Object());
try {
getToken().unparse(primaryContext, primaryProf);
fail();
} catch (ClassCastException e) {
// Yep!
}
}
use of pcgen.cdom.enumeration.ListKey in project pcgen by PCGen.
the class ArmorProfTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey listKey = ListKey.AUTO_ARMORPROF;
primaryProf.addToListFor(listKey, new Object());
try {
getToken().unparse(primaryContext, primaryProf);
fail();
} catch (ClassCastException e) {
// Yep!
}
}
use of pcgen.cdom.enumeration.ListKey in project pcgen by PCGen.
the class EquipTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey listKey = ListKey.EQUIPMENT;
primaryProf.addToListFor(listKey, new Object());
try {
getToken().unparse(primaryContext, primaryProf);
fail();
} catch (ClassCastException e) {
// Yep!
}
}
use of pcgen.cdom.enumeration.ListKey in project pcgen by PCGen.
the class WeaponProfTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey listKey = ListKey.WEAPONPROF;
primaryProf.addToListFor(listKey, new Object());
try {
getToken().unparse(primaryContext, primaryProf);
fail();
} catch (ClassCastException e) {
// Yep!
}
}
use of pcgen.cdom.enumeration.ListKey in project pcgen by PCGen.
the class AbstractTextPropertyTokenTestCase method testUnparseGenericsFail.
/*
* TODO Need to define the appropriate behavior here - is this the token's
* responsibility?
*/
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey objectKey = getListKey();
primaryProf.addToListFor(objectKey, new Object());
try {
getToken().unparse(primaryContext, primaryProf);
fail();
} catch (ClassCastException e) {
// Yep!
}
}
Aggregations