public void ShouldEquateAttributes() { //assign _characterSheet = new CharacterSheet(new Fighter(), new WoodElf(), _attributeSet); //act ICharacterAttribute actualAttribute = _characterSheet.Attribute(CharacterAttributeName.Dexterity); //assert actualAttribute.Should().Be(new DexterityAttribute()); }
public void ShouldReturnActivatedAndNonActiveSkillsForHumanWizard() { //arrange _characterSheet = new CharacterSheet(new Wizard(), new Human(), new FakeWizardAttributeSet()); ICharacterAttribute attribute = _characterSheet.Attribute(CharacterAttributeName.Dexterity); SleightOfHand slightOfHand = new SleightOfHand((DexterityAttribute)attribute, true); //act _characterSheet.ActivateSkill(slightOfHand); //assert List <ISkill> actualSkills = _characterSheet.Skills(); actualSkills.First(item => item.Name().Equals(new TextObj("Sleight Of Hand"))).SkillBonus().Should().Be(new AttributeScore(1)); actualSkills.First(item => item.Name().Equals(new TextObj("Acrobatics"))).SkillBonus().Should().Be(new AttributeScore(-1)); }
public void ShouldApplyRacialBonusToAttributes() { //arrange AttributeScore expectedDexterityScore = new AttributeScore(12); AttributeScore expectedWisdomScore = new AttributeScore(11); _characterSheet = new CharacterSheet(new Fighter(), new WoodElf(), _attributeSet); //assert _characterSheet.Attribute(CharacterAttributeName.Strength).Score().Should().Be(new FakeAttribute().Score()); _characterSheet.Attribute(CharacterAttributeName.Dexterity).Score().Should().Be(expectedDexterityScore); _characterSheet.Attribute(CharacterAttributeName.Constitution).Score().Should().Be(new FakeAttribute().Score()); _characterSheet.Attribute(CharacterAttributeName.Intelligence).Score().Should().Be(new FakeAttribute().Score()); _characterSheet.Attribute(CharacterAttributeName.Wisdom).Score().Should().Be(expectedWisdomScore); _characterSheet.Attribute(CharacterAttributeName.Charisma).Score().Should().Be(new FakeAttribute().Score()); }