Search in sources :

Example 41 with TestContext

use of plugin.lsttokens.editcontext.testsupport.TestContext in project pcgen by PCGen.

the class QualifyIntegrationTest method testRoundRobinSimple.

@Test
public void testRoundRobinSimple() throws PersistenceLayerException {
    verifyCleanStart();
    Ability a = primaryContext.getReferenceContext().constructCDOMObject(Ability.class, "My Feat");
    primaryContext.getReferenceContext().reassociateCategory(AbilityCategory.FEAT, a);
    a = secondaryContext.getReferenceContext().constructCDOMObject(Ability.class, "My Feat");
    secondaryContext.getReferenceContext().reassociateCategory(AbilityCategory.FEAT, a);
    primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Lightning Bolt");
    secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Lightning Bolt");
    TestContext tc = new TestContext();
    commit(testCampaign, tc, "ABILITY=FEAT|My Feat");
    commit(modCampaign, tc, "SPELL|Lightning Bolt");
    completeRoundRobin(tc);
}
Also used : Ability(pcgen.core.Ability) TestContext(plugin.lsttokens.editcontext.testsupport.TestContext) Test(org.junit.Test)

Example 42 with TestContext

use of plugin.lsttokens.editcontext.testsupport.TestContext in project pcgen by PCGen.

the class SpellKnownIntegrationTest method testRoundRobinNoReset.

@Test
public void testRoundRobinNoReset() throws PersistenceLayerException {
    primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Fireball");
    secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Fireball");
    primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Lightning Bolt");
    secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Lightning Bolt");
    primaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Wizard");
    secondaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Wizard");
    verifyCleanStart();
    TestContext tc = new TestContext();
    commit(testCampaign, tc, "CLASS|Wizard=2|Fireball,Lightning Bolt|PRECLASS:1,Fighter=2");
    emptyCommit(modCampaign, tc);
    completeRoundRobin(tc);
}
Also used : TestContext(plugin.lsttokens.editcontext.testsupport.TestContext) Test(org.junit.Test)

Example 43 with TestContext

use of plugin.lsttokens.editcontext.testsupport.TestContext in project pcgen by PCGen.

the class SpellKnownIntegrationTest method testRoundRobinNoSet.

@Test
public void testRoundRobinNoSet() throws PersistenceLayerException {
    primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Fireball");
    secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Fireball");
    verifyCleanStart();
    TestContext tc = new TestContext();
    emptyCommit(testCampaign, tc);
    commit(modCampaign, tc, "CLASS|SPELLCASTER.Arcane=2|Fireball|PRECLASS:1,Fighter=2");
    completeRoundRobin(tc);
}
Also used : TestContext(plugin.lsttokens.editcontext.testsupport.TestContext) Test(org.junit.Test)

Example 44 with TestContext

use of plugin.lsttokens.editcontext.testsupport.TestContext in project pcgen by PCGen.

the class SpellLevelIntegrationTest method testRoundRobinSimple.

@Test
public void testRoundRobinSimple() throws PersistenceLayerException {
    primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Fireball");
    secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Fireball");
    primaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Cleric");
    secondaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Cleric");
    primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Bless");
    secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Bless");
    primaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Wizard");
    secondaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Wizard");
    verifyCleanStart();
    TestContext tc = new TestContext();
    commit(testCampaign, tc, "CLASS|Wizard=3|Bless");
    commit(modCampaign, tc, "CLASS|Cleric=2|Fireball|PRECLASS:1,Fighter=2");
    completeRoundRobin(tc);
}
Also used : TestContext(plugin.lsttokens.editcontext.testsupport.TestContext) Test(org.junit.Test)

Example 45 with TestContext

use of plugin.lsttokens.editcontext.testsupport.TestContext in project pcgen by PCGen.

the class CSkillIntegrationTest method testRoundRobinStartList.

@Test
public void testRoundRobinStartList() throws PersistenceLayerException {
    construct(primaryContext, "TestWP2");
    construct(secondaryContext, "TestWP2");
    verifyCleanStart();
    TestContext tc = new TestContext();
    commit(testCampaign, tc, getPrefix() + "LIST");
    commit(modCampaign, tc, getPrefix() + "TestWP2");
    completeRoundRobin(tc);
}
Also used : TestContext(plugin.lsttokens.editcontext.testsupport.TestContext) Test(org.junit.Test)

Aggregations

TestContext (plugin.lsttokens.editcontext.testsupport.TestContext)508 Test (org.junit.Test)507 Ability (pcgen.core.Ability)13 PCClassLevel (pcgen.cdom.inst.PCClassLevel)3 AbilityCategory (pcgen.core.AbilityCategory)2 SubClassCategory (pcgen.cdom.enumeration.SubClassCategory)1 SubClass (pcgen.core.SubClass)1