Exemplo n.º 1
0
        public void ReturnFalse_WhenICommandParameterEventNamePropertyIsDifferentComparedToEnterCombat(string eventName)
        {
            // Arrange
            var enterCombatCommandResolutionHandler = new MockExitCombatCommandResolutionHandler();

            var command = new Mock <ICommand>();

            command.SetupGet(c => c.EventName).Returns(eventName);

            // Act
            var actualResult = enterCombatCommandResolutionHandler.CanHandleCommand(command.Object);

            // Assert
            Assert.That(actualResult, Is.False);
        }
Exemplo n.º 2
0
        public void ReturnTrue_WhenICommandParameterEventNamePropertyIsIdenticalToEnterCombat()
        {
            // Arrange
            var enterCombatCommandResolutionHandler = new MockExitCombatCommandResolutionHandler();

            var viableEventName = "ExitCombat";
            var command         = new Mock <ICommand>();

            command.SetupGet(c => c.EventName).Returns(viableEventName);

            // Act
            var actualResult = enterCombatCommandResolutionHandler.CanHandleCommand(command.Object);

            // Assert
            Assert.That(actualResult, Is.True);
        }