public void ShouldApplyRacialBonus()
        {
            //arrange
            ICharacterAttribute strAttribute = new CharacterAttribute(CharacterAttributeName.Strength, new AttributeScore(12));
            ICharacterAttribute dexAttribute = new CharacterAttribute(CharacterAttributeName.Dexterity, new AttributeScore(14));
            ICharacterAttribute conAttribute = new CharacterAttribute(CharacterAttributeName.Constitution, new AttributeScore(2));
            ICharacterAttribute intAttribute = new CharacterAttribute(CharacterAttributeName.Intelligence, new AttributeScore(5));
            ICharacterAttribute wizAttribute = new CharacterAttribute(CharacterAttributeName.Wisdom, new AttributeScore(7));
            ICharacterAttribute chrAttribute = new CharacterAttribute(CharacterAttributeName.Charisma, new AttributeScore(9));

            //act
            IAttributeScore expectedStr = CharacterRace.MountainDwarf.RacialAttributeAdjustment(strAttribute);
            IAttributeScore expectedDex = CharacterRace.MountainDwarf.RacialAttributeAdjustment(dexAttribute);
            IAttributeScore expectedCon = CharacterRace.MountainDwarf.RacialAttributeAdjustment(conAttribute);
            IAttributeScore expectedInt = CharacterRace.MountainDwarf.RacialAttributeAdjustment(intAttribute);
            IAttributeScore expectedWiz = CharacterRace.MountainDwarf.RacialAttributeAdjustment(wizAttribute);
            IAttributeScore expectedChr = CharacterRace.MountainDwarf.RacialAttributeAdjustment(chrAttribute);

            //assert
            expectedStr.Should().Be(new AttributeScore(2));
            expectedDex.Should().Be(new AttributeScore(0));
            expectedCon.Should().Be(new AttributeScore(2));
            expectedInt.Should().Be(new AttributeScore(0));
            expectedWiz.Should().Be(new AttributeScore(0));
            expectedChr.Should().Be(new AttributeScore(0));
        }
        public void ShouldReturnActiveSkillBonus()
        {
            //arrange
            ISkill         expectedSkillBase = new Deception(new CharismaAttribute(new AttributeScore(14)), true);
            AttributeScore score             = new AttributeScore(4);
            //act
            IAttributeScore actualScore = expectedSkillBase.SkillBonus();

            //assert
            actualScore.Should().Be(score);
        }
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            CharismaAttribute dexterityAttribute = new CharismaAttribute(new AttributeScore(14));
            ISkill            intimidation       = new Intimidation(dexterityAttribute);
            IAttributeScore   expectedScore      = new AttributeScore(2);
            //act
            IAttributeScore actualScore = intimidation.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            CharismaAttribute charismaAttribute = new CharismaAttribute(new AttributeScore(14));
            ISkill            deception         = new Deception(charismaAttribute, false);
            IAttributeScore   expectedScore     = new AttributeScore(2);
            //act
            IAttributeScore actualScore = deception.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            CharismaAttribute dexterityAttribute = new CharismaAttribute(new AttributeScore(14));
            ISkill            performance        = new Performance(dexterityAttribute);
            IAttributeScore   expectedScore      = new AttributeScore(2);
            //act
            IAttributeScore actualScore = performance.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #6
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            StrengthAttribute strengthAttribute = new StrengthAttribute(new AttributeScore(14));
            ISkill            athletics         = new Athletics(strengthAttribute);
            IAttributeScore   expectedScore     = new AttributeScore(2);
            //act
            IAttributeScore actualScore = athletics.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #7
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14));
            ISkill          insight         = new Insight(wisdomAttribute);
            IAttributeScore expectedScore   = new AttributeScore(2);
            //act
            IAttributeScore actualScore = insight.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #8
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14));
            ISkill          animalHandling  = new AnimalHandling(wisdomAttribute);
            IAttributeScore expectedScore   = new AttributeScore(2);
            //act
            IAttributeScore actualScore = animalHandling.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #9
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            WisdomAttribute wisdomAttribute = new WisdomAttribute(new AttributeScore(14));
            ISkill          perception      = new Perception(wisdomAttribute);
            IAttributeScore expectedScore   = new AttributeScore(2);
            //act
            IAttributeScore actualScore = perception.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #10
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            DexterityAttribute dexterityAttribute = new DexterityAttribute(new AttributeScore(14));
            ISkill             sleightOfHand      = new SleightOfHand(dexterityAttribute);
            IAttributeScore    expectedScore      = new AttributeScore(2);
            //act
            IAttributeScore actualScore = sleightOfHand.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #11
0
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            DexterityAttribute dexterityAttribute = new DexterityAttribute(new AttributeScore(14));
            ISkill             acrobatics         = new Acrobatics(dexterityAttribute);
            IAttributeScore    expectedScore      = new AttributeScore(2);
            //act
            IAttributeScore actualScore = acrobatics.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            IntellegenceAttribute intellegenceAttribute = new IntellegenceAttribute(new AttributeScore(14));
            ISkill          history       = new History(intellegenceAttribute);
            IAttributeScore expectedScore = new AttributeScore(2);
            //act
            IAttributeScore actualScore = history.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
        public void ShouldReturnBonusOfBaseAttribute()
        {
            //arrange
            IntellegenceAttribute intellegenceAttribute = new IntellegenceAttribute(new AttributeScore(14));
            ISkill          investigation = new Investigation(intellegenceAttribute);
            IAttributeScore expectedScore = new AttributeScore(2);
            //act
            IAttributeScore actualScore = investigation.SkillBonus();

            //assert
            actualScore.Should().Be(expectedScore);
        }
Exemple #14
0
        public void ShouldReturnAttributeBonus()
        {
            //arrange
            ICharacterAttribute attribute = new DexterityAttribute(new AttributeScore(1));
            IAttributeScore     expectedAttributeBonus = new AttributeScore(-5);

            //act
            IAttributeScore actualAttributeBonus = attribute.Bonus();

            //assert
            actualAttributeBonus.Should().Be(expectedAttributeBonus);
        }