public void Register_ShouldRegisterType_WhenTypeIsValid()
 {
     var handler = new ApiRequestHandler("test");
     var type = typeof(ValidController);
     handler.Register("Test", type);
     Assert.AreEqual(type, handler.GetControllerType("Test"));
 }
 public void Register_ShouldThrowException_WhenTypeIsNotApiController()
 {
     try
     {
         var handler = new ApiRequestHandler("test");
         handler.Register("test", typeof(int));
     }
     catch (ApplicationException)
     {
         return;
     }
     Assert.Fail("ApplicationExcpetion was not thrown");
 }
 public void Register_ShouldThrowException_WhenTypeDoesNotHaveParameterlessConstructor()
 {
     try
     {
         var handler = new ApiRequestHandler("test");
         handler.Register("test", typeof(BadController));
     }
     catch (ApplicationException)
     {
         return;
     }
     Assert.Fail("ApplicationExcpetion was not thrown");
 }