use of pcgen.cdom.enumeration.ListKey in project pcgen by PCGen.
the class DomainTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey objectKey = ListKey.DOMAIN;
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 DomainTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey objectKey = ListKey.DOMAIN;
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 ArmortypeTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey objectKey = ListKey.ARMORTYPE;
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 LangTokenTest method testUnparseGenericsFail.
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey listKey = ListKey.AUTO_LANGUAGE;
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 ShieldProfTokenTest method testUnparseGenericsFail.
@SuppressWarnings("unchecked")
@Test
public void testUnparseGenericsFail() throws PersistenceLayerException {
ListKey listKey = ListKey.AUTO_SHIELDPROF;
primaryProf.addToListFor(listKey, new Object());
try {
getToken().unparse(primaryContext, primaryProf);
fail();
} catch (ClassCastException e) {
// Yep!
}
}
Aggregations