Beispiel #1
0
        public async Task Should_Throw_Exception()
        {
            // Arrange
            IRequestHandler <Ping, Pong> requestHandler = new Level0PingHandler();

            // Act
            var response = await requestHandler.Handle(new Ping()
            {
                Message = "Ping", LevelType = PingLevelTypes.Level3
            }, default(CancellationToken));
        }
Beispiel #2
0
        public async Task Should_Call_Third_Abstract_Handler()
        {
            // Arrange
            IRequestHandler <Ping, Pong> requestHandler = new Level0PingHandler();
            var expected = "Ping Pong 2";

            // Act
            var response = await requestHandler.Handle(new Ping()
            {
                Message = "Ping", LevelType = PingLevelTypes.Level2
            }, default(CancellationToken));

            // Assert
            Assert.AreEqual(expected, response.Message);
        }