Exemplo n.º 1
0
        public void Process_WithNotRegisteredHandler_ShouldThrowException()
        {
            // Assign
            FakeUnregisteredCommand command   = new FakeUnregisteredCommand();
            ICommandProcessor       processor = new FakeFireForgetCommandProcessor();

            // Act, Assert
            Assert.Throws <ArgumentException>(() => processor.Process(command));
        }
Exemplo n.º 2
0
        public void CanProcess_WithNotRegisteredHandler_ShouldReturnFalse()
        {
            // Assign
            FakeUnregisteredCommand command   = new FakeUnregisteredCommand();
            ICommandProcessor       processor = new FakeFireForgetCommandProcessor();

            // Act
            bool canProcess = processor.CanProcess(command);

            // Assert
            Assert.False(canProcess);
        }