public void AddVarietyOfNamesGetThemBackCorrectly() { var cr = new CharacterResolver(); cr.SetPlayer("Khadaji"); cr.SetMercenary("Movanna"); cr.SetPet("Khadaji`s pet"); cr.SetPet("Jabantik"); cr.SetNonPlayer("Gomphus"); Assert.AreEqual(CharacterResolver.Type.Player, cr.WhichType("Khadaji")); Assert.AreEqual(CharacterResolver.Type.Mercenary, cr.WhichType("Movanna")); Assert.AreEqual(CharacterResolver.Type.Pet, cr.WhichType("Khadaji`s pet")); Assert.AreEqual(CharacterResolver.Type.Pet, cr.WhichType("Jabantik")); Assert.AreEqual(CharacterResolver.Type.NonPlayerCharacter, cr.WhichType("Gomphus")); }
public void PetOverridesPlayer() { var cr = new CharacterResolver(); cr.SetPlayer("Bob"); cr.SetPet("Bob"); Assert.AreEqual(CharacterResolver.Type.Pet, cr.WhichType("Bob")); }