コード例 #1
0
        public void AddDeathSavingThrowFailure_ShouldChangeStatusToDead_WhenCalledThreeTimes()
        {
            // Arrange
            var instance = new HitPoints(42);

            // Act
            instance.AddDeathSavingThrowFailure();
            instance.AddDeathSavingThrowFailure();
            instance.AddDeathSavingThrowFailure();
            // Assert
            instance.DeathSavingThrowFailures.Should().Be(3);
            instance.Status.Should().Be(LifeStatuses.Dead);
        }
コード例 #2
0
        public void AddDeathSavingThrowFailure_ShouldIncrementCount()
        {
            // Arrange
            var instance = new HitPoints(42);

            // Act
            instance.AddDeathSavingThrowFailure();
            // Assert
            instance.DeathSavingThrowFailures.Should().Be(1);
        }