use of pcgen.cdom.base.CDOMObject in project pcgen by PCGen.
the class AbstractQualifierTokenTestCase method testRoundRobinMultTypes.
@Test
public void testRoundRobinMultTypes() throws PersistenceLayerException {
CDOMObject a = construct(primaryContext, "Typed1");
a.addToListFor(ListKey.TYPE, Type.getConstant("Buckler"));
CDOMObject b = construct(primaryContext, "Typed2");
b.addToListFor(ListKey.TYPE, Type.getConstant("Heavy"));
CDOMObject c = construct(secondaryContext, "Typed1");
c.addToListFor(ListKey.TYPE, Type.getConstant("Buckler"));
CDOMObject d = construct(secondaryContext, "Typed2");
d.addToListFor(ListKey.TYPE, Type.getConstant("Heavy"));
CDOMObject e = construct(primaryContext, "Typed3");
e.addToListFor(ListKey.TYPE, Type.getConstant("Light"));
CDOMObject g = construct(secondaryContext, "Typed3");
g.addToListFor(ListKey.TYPE, Type.getConstant("Light"));
runRoundRobin(getSubTokenName() + '|' + qualifier + "[TYPE=Buckler|TYPE=Heavy|TYPE=Light]");
}
use of pcgen.cdom.base.CDOMObject in project pcgen by PCGen.
the class AbstractQualifierTokenTestCase method testValidQualifiedInputLotsAnd.
@Test
public void testValidQualifiedInputLotsAnd() throws PersistenceLayerException {
CDOMObject a = construct(primaryContext, "Typed1");
a.addToListFor(ListKey.TYPE, Type.getConstant("Foo"));
CDOMObject b = construct(primaryContext, "Typed2");
b.addToListFor(ListKey.TYPE, Type.getConstant("Yea"));
CDOMObject c = construct(secondaryContext, "Typed1");
c.addToListFor(ListKey.TYPE, Type.getConstant("Foo"));
CDOMObject d = construct(secondaryContext, "Typed2");
d.addToListFor(ListKey.TYPE, Type.getConstant("Yea"));
CDOMObject e = construct(primaryContext, "Typed3");
e.addToListFor(ListKey.TYPE, Type.getConstant("Bar"));
CDOMObject f = construct(primaryContext, "Typed4");
f.addToListFor(ListKey.TYPE, Type.getConstant("Goo"));
CDOMObject g = construct(secondaryContext, "Typed3");
g.addToListFor(ListKey.TYPE, Type.getConstant("Bar"));
CDOMObject h = construct(secondaryContext, "Typed4");
h.addToListFor(ListKey.TYPE, Type.getConstant("Goo"));
runRoundRobin(getSubTokenName() + '|' + qualifier + "[TYPE=Bar,TYPE=Goo]," + qualifier + "[TYPE=Foo,TYPE=Yea]");
}
use of pcgen.cdom.base.CDOMObject in project pcgen by PCGen.
the class AbstractListInputTokenTestCase method testRoundRobinWithEqualType.
@Test
public void testRoundRobinWithEqualType() throws PersistenceLayerException {
if (isTypeLegal()) {
construct(primaryContext, "TestWP1");
construct(primaryContext, "TestWP2");
construct(secondaryContext, "TestWP1");
construct(secondaryContext, "TestWP2");
CDOMObject a = (CDOMObject) construct(primaryContext, "Typed1");
a.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
CDOMObject b = (CDOMObject) construct(primaryContext, "Typed2");
b.addToListFor(ListKey.TYPE, Type.getConstant("OtherTestType"));
CDOMObject c = (CDOMObject) construct(secondaryContext, "Typed1");
c.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
CDOMObject d = (CDOMObject) construct(secondaryContext, "Typed2");
d.addToListFor(ListKey.TYPE, Type.getConstant("OtherTestType"));
runRoundRobin("TestWP1" + getJoinCharacter() + "TestWP2" + getJoinCharacter() + "TYPE=OtherTestType" + getJoinCharacter() + "TYPE=TestType");
}
}
use of pcgen.cdom.base.CDOMObject in project pcgen by PCGen.
the class AbstractGlobalListTokenTestCase method testRoundRobinTestEqualThree.
@Test
public void testRoundRobinTestEqualThree() throws PersistenceLayerException {
if (isTypeLegal()) {
CDOMObject b = construct(primaryContext, "TestWP3");
b.addToListFor(ListKey.TYPE, Type.getConstant("TestAltType"));
b.addToListFor(ListKey.TYPE, Type.getConstant("TestThirdType"));
b.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
CDOMObject d = construct(secondaryContext, "TestWP3");
d.addToListFor(ListKey.TYPE, Type.getConstant("TestAltType"));
d.addToListFor(ListKey.TYPE, Type.getConstant("TestThirdType"));
d.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
runRoundRobin("TYPE=TestAltType.TestThirdType.TestType");
}
}
use of pcgen.cdom.base.CDOMObject in project pcgen by PCGen.
the class AbstractChooseTokenTestCase method testValidQualifiedPCInputLotsAnd.
@Test
public void testValidQualifiedPCInputLotsAnd() throws PersistenceLayerException {
if (allowsPCQualifier) {
CDOMObject a = (CDOMObject) construct(primaryContext, "Typed1");
a.addToListFor(ListKey.TYPE, Type.getConstant("Foo"));
CDOMObject b = (CDOMObject) construct(primaryContext, "Typed2");
b.addToListFor(ListKey.TYPE, Type.getConstant("Yea"));
CDOMObject c = (CDOMObject) construct(secondaryContext, "Typed1");
c.addToListFor(ListKey.TYPE, Type.getConstant("Foo"));
CDOMObject d = (CDOMObject) construct(secondaryContext, "Typed2");
d.addToListFor(ListKey.TYPE, Type.getConstant("Yea"));
CDOMObject e = (CDOMObject) construct(primaryContext, "Typed3");
e.addToListFor(ListKey.TYPE, Type.getConstant("Bar"));
CDOMObject f = (CDOMObject) construct(primaryContext, "Typed4");
f.addToListFor(ListKey.TYPE, Type.getConstant("Goo"));
CDOMObject g = (CDOMObject) construct(secondaryContext, "Typed3");
g.addToListFor(ListKey.TYPE, Type.getConstant("Bar"));
CDOMObject h = (CDOMObject) construct(secondaryContext, "Typed4");
h.addToListFor(ListKey.TYPE, Type.getConstant("Goo"));
runRoundRobin(getSubTokenName() + '|' + "PC[TYPE=Bar,TYPE=Goo],PC[TYPE=Foo,TYPE=Yea]");
}
}
Aggregations