Example #1
0
        public void AwesomeCommandHandler_Inherit_From_CommandHandler()
        {
            //Arrange
            var type = typeof(CommandHandler <Request <bool>, bool>);

            //Act
            var handler = new AwesomeCommandHandler <Request <bool>, bool>(CreateMapperMock().Object);

            //Assert
            Assert.IsAssignableFrom(type, handler);
        }
Example #2
0
        public void AwesomeCommandHandler_MapTo_Calls_The_MapTo_Method_On_The_Mapper()
        {
            //Arrange
            var mapperMock = CreateMapperMock();
            var handler    = new AwesomeCommandHandler <Request <bool>, bool>(mapperMock.Object);

            //Act
            handler.Call_MapTo_Of_String_With_Parameter_Of_Type_String();

            //Assert
            mapperMock.Verify(P => P.MapTo <string>(""));
        }