Exemple #1
0
        public void AddPoints_NegativeAmount_ThrowsException()
        {
            // Assign
            var abilityScores = new CharacterAbilities();

            // Act
            // Assert
            Assert.Throws<ArgumentException>(() => abilityScores.AddPoints(-10));
        }
Exemple #2
0
        public void AddPoints_Zero_DoesNotChangeUnusedPoints()
        {
            // Assign
            var abilityScores = new CharacterAbilities();

            // Act
            abilityScores.AddPoints(0);

            // Assert
            Assert.Equal(0, abilityScores.UnusedPoints);
        }
Exemple #3
0
        public void AddPoints_PositiveAmount_IncreasesUnusedPoints()
        {
            // Assign
            var abilityScores = new CharacterAbilities();

            // Act
            abilityScores.AddPoints(10);

            // Assert
            Assert.Equal(10, abilityScores.UnusedPoints);
        }