Ejemplo n.º 1
0
        public void ApplyNext_QueueNotEmptyAndUserAlive_ReturnsAppliedMoveUse()
        {
            // Arrange
            var moveUse = new MoveUse
            {
                Move            = TestHelpers.CreateMove(),
                User            = TestHelpers.CreateBasicCharacter(),
                OtherCharacters = Enumerable.Empty <Character>(),
            };

            var moveProcessor = new MoveProcessor();

            _ = moveProcessor.Push(moveUse);

            // Act
            var appliedMoveUse = moveProcessor.ApplyNext();

            // Assert
            Assert.That(appliedMoveUse.HasResult, Is.True);
        }
Ejemplo n.º 2
0
        public void ApplyNext_QueueNotEmptyAndUserDead_ReturnsUnappliedMoveUse()
        {
            // Arrange
            var moveUse = new MoveUse
            {
                Move = TestHelpers.CreateMove(),
                User = TestHelpers.CreateBasicCharacter(),
            };

            _ = moveUse.User.ReceiveDamage <Move>(6, TestHelpers.CreateBasicCharacter());

            var moveProcessor = new MoveProcessor();

            _ = moveProcessor.Push(moveUse);

            // Act
            var appliedMoveUse = moveProcessor.ApplyNext();

            // Assert
            Assert.That(appliedMoveUse.HasResult, Is.False);
        }