public static ICommandHandler <TCommand, TResult> GetHandler <TCommand, TResult>(this MockRegister register)
 {
     return(register.GetMock <ICommandHandler <TCommand, TResult> >());
 }
 public DispatchingCommandHandler(MockRegister register)
 {
     _register = register;
 }
 public static object GetHandler(this MockRegister register, Type commandType, Type resultType)
 {
     return(register.GetMock(typeof(ICommandHandler <,>).MakeGenericType(commandType, resultType)));
 }