public void ShouldReturnStrengthAttributeScores()
        {
            //arrange
            ICharacterAttribute expectedAttribute = new StrengthAttribute();

            //assert
            _attributeSet.MatchesName(CharacterAttributeName.Strength).Should().Be(expectedAttribute);
        }
Ejemplo n.º 2
0
        public void ShouldEquateName()
        {
            //assign
            ICharacterAttribute attribute  = new StrengthAttribute(new AttributeScore(18));
            ICharacterAttribute attribute2 = new StrengthAttribute(new AttributeScore(5));

            //assert
            attribute2.Should().Be(attribute);
        }
        public void ShouldAddAttribute()
        {
            //arrange
            ICharacterAttribute expectedAttribute = new StrengthAttribute(new AttributeScore(18));

            //act
            _attributeSet.MatchesName(CharacterAttributeName.Strength).Set(expectedAttribute.Score());
            //assert
            _attributeSet.MatchesName(CharacterAttributeName.Strength).Score().Should().Be(expectedAttribute.Score());
        }
        public void ShouldMatchName()
        {
            //assign
            ICharacterAttribute expectedAttribute = new StrengthAttribute(new AttributeScore(18));
            //act
            ICharacterAttribute actualAttribute = _attributeSet.MatchesName(CharacterAttributeName.Strength);

            //assert
            actualAttribute.Should().Be(expectedAttribute);
        }
Ejemplo n.º 5
0
        public void ShouldNotMatchName()
        {
            //assign
            ICharacterAttribute attribute = new StrengthAttribute(new AttributeScore(18));
            //act
            bool matchesName = attribute.MatchesName(CharacterAttributeName.Dexterity);

            //assert
            matchesName.Should().BeFalse();
        }
Ejemplo n.º 6
0
        public void ShouldMatchName()
        {
            //assign
            ICharacterAttribute attribute = new StrengthAttribute(new AttributeScore(18));
            //act
            bool matchesName = attribute.MatchesName(CharacterAttributeName.Strength);

            //assert
            matchesName.Should().BeTrue();
        }
Ejemplo n.º 7
0
        public void ShouldReturnWisdomAsBaseAttribute()
        {
            //arrange
            ISkill skill = new Athletics();
            ICharacterAttribute strengthAttribute = new StrengthAttribute();
            //act
            ICharacterAttribute actualAttribute = skill.BaseAttribute();

            //assert
            actualAttribute.Should().Be(strengthAttribute);
        }
Ejemplo n.º 8
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);
        }
Ejemplo n.º 9
0
 public Athletics(StrengthAttribute strengthAttribute, bool activateSkill = false) : base(new TextObj("Athletics"), strengthAttribute, activateSkill)
 {
 }