コード例 #1
0
        public void ShouldNotEquate()
        {
            //arrange
            IAttributeScore score1 = new AttributeScore(4);
            IAttributeScore score2 = new AttributeScore(8);

            //assert
            score2.Should().NotBe(score1);
        }
コード例 #2
0
 public void ShouldSubtract()
 {
     //arrange
     AttributeScore score1 = new AttributeScore(6);
     AttributeScore score2 = new AttributeScore(8);
     IAttributeScore totalScore = new AttributeScore(2);
     IAttributeScore actualScore = score2.Subtract(score1);
     //assert
     totalScore.Should().Be(actualScore);
 }
コード例 #3
0
 public void ShouldAdd()
 {
     //arrange
     AttributeScore score1 = new AttributeScore(4);
     AttributeScore score2 = new AttributeScore(8);
     IAttributeScore totalScore = new AttributeScore(12);
     IAttributeScore actualScore = score1.Add(score2);
     //assert
     totalScore.Should().Be(actualScore);
 }