コード例 #1
0
        public static EventController GetInitialisedNotesController(IEventService eventService)
        {
            var controller = new EventController(eventService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri("http://localhost/api/") },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
コード例 #2
0
 public void EventController_NullEventService_ThrowsException()
 {
     //act
     var sut = new EventController(null);
 }
コード例 #3
0
 public void Setup()
 {
     _eventController = ControllerHelper.GetInitialisedNotesController(_mockEventService.Object);
     AutoMapperConfig.Bootstrap();
 }