Search in sources :

Example 16 with CompanionMod

use of pcgen.core.character.CompanionMod in project pcgen by PCGen.

the class RaceTypeFacetTest method testGetFromCModOverridesRace.

@Test
public void testGetFromCModOverridesRace() {
    Race r = new Race();
    r.put(ObjectKey.RACETYPE, TEST_RACE_TYPE);
    rfacet.set(id, r);
    assertSame(TEST_RACE_TYPE, facet.getRaceType(id));
    CompanionMod c = new CompanionMod();
    c.put(ObjectKey.RACETYPE, RACE_TYPE_TOO);
    cfacet.add(id, c);
    assertSame(RACE_TYPE_TOO, facet.getRaceType(id));
    cfacet.remove(id, c);
    assertSame(TEST_RACE_TYPE, facet.getRaceType(id));
}
Also used : Race(pcgen.core.Race) CompanionMod(pcgen.core.character.CompanionMod) Test(org.junit.Test)

Aggregations

CompanionMod (pcgen.core.character.CompanionMod)16 Test (org.junit.Test)6 Race (pcgen.core.Race)4 HashMap (java.util.HashMap)2 Map (java.util.Map)2 CDOMSingleRef (pcgen.cdom.reference.CDOMSingleRef)2 PCTemplate (pcgen.core.PCTemplate)2 ArrayList (java.util.ArrayList)1 ChooseInformation (pcgen.cdom.base.ChooseInformation)1 LevelCommandFactory (pcgen.cdom.content.LevelCommandFactory)1 RaceType (pcgen.cdom.enumeration.RaceType)1 Type (pcgen.cdom.enumeration.Type)1 CompanionList (pcgen.cdom.list.CompanionList)1 Follower (pcgen.core.character.Follower)1 ParseResult (pcgen.rules.persistence.token.ParseResult)1 AbstractContentTokenTest (tokencontent.testsupport.AbstractContentTokenTest)1 AbstractTokenModelTest (tokenmodel.testsupport.AbstractTokenModelTest)1