public void ShouldReturnDexterityAttributeScores()
        {
            //arrange
            ICharacterAttribute expectedAttribute = new DexterityAttribute();

            //assert
            _attributeSet.MatchesName(CharacterAttributeName.Dexterity).Should().Be(expectedAttribute);
        }
Esempio n. 2
0
        public void ShouldNotEquateName()
        {
            //assign
            ICharacterAttribute attribute  = new StrengthAttribute(new AttributeScore(18));
            ICharacterAttribute attribute2 = new DexterityAttribute(new AttributeScore(18));

            //assert
            attribute2.Should().NotBe(attribute);
        }
Esempio n. 3
0
        public void ShouldApplyRacialAttributeBonus()
        {
            //arrange
            ICharacterAttribute attribute = new DexterityAttribute(new AttributeScore(10));

            //act
            attribute.ApplyRacialBonus(CharacterRace.Human);
            //assert
            attribute.Score().Should().Be(new AttributeScore(11));
        }
Esempio n. 4
0
        public void ShouldReturnBaseAttribute()
        {
            //arrange
            ISkill skill = new SleightOfHand();
            ICharacterAttribute dexterityAttribute = new DexterityAttribute();
            //act
            ICharacterAttribute actualAttribute = skill.BaseAttribute();

            //assert
            actualAttribute.Should().Be(dexterityAttribute);
        }
Esempio n. 5
0
        public void ShouldReturnBaseAttribute()
        {
            //arrange
            ISkill acrobatics = new Acrobatics();
            ICharacterAttribute dexterityAttribute = new DexterityAttribute();
            //act
            ICharacterAttribute actualAttribute = acrobatics.BaseAttribute();

            //assert
            actualAttribute.Should().Be(dexterityAttribute);
        }
Esempio n. 6
0
        public void ShouldSetScore()
        {
            //arrange
            ICharacterAttribute attribute     = new DexterityAttribute(new AttributeScore(10));
            IAttributeScore     expectedScore = new AttributeScore(14);

            //act
            attribute.Set(expectedScore);
            //assert
            attribute.Score().Should().Be(expectedScore);
        }
Esempio n. 7
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);
        }
Esempio n. 8
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);
        }
Esempio n. 9
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);
        }
Esempio n. 10
0
        public void ShouldReturnJsonObject()
        {
            //arrange
            ICharacterAttribute attribute     = new DexterityAttribute(new AttributeScore(10));
            IAttributeScore     expectedScore = new AttributeScore(14);
            string        expectedJson        = "{\"characterAttribute\":\"DEX\",\"value\":10}";
            StringBuilder sb = new StringBuilder();

            //act
            attribute.AddJsonToStringbuilder(sb);
            //assert
            sb.ToString().Should().Be(expectedJson);
        }
Esempio n. 11
0
 public Acrobatics(DexterityAttribute dexterityAttribute, bool activateSkill = false) : base(new TextObj("Acrobatics"), dexterityAttribute, activateSkill)
 {
 }
Esempio n. 12
0
 public Stealth(DexterityAttribute dexterityAttribute, bool activateSkill = false) : base(new TextObj("Stealth"), dexterityAttribute, activateSkill)
 {
 }
Esempio n. 13
0
 public SleightOfHand(DexterityAttribute dexterityAttribute, bool activateSkill = false) : base(new TextObj("Sleight Of Hand"), dexterityAttribute, activateSkill)
 {
 }