public void DetailsHasRouteAttributeWithCorrectRoute()
 {
     var sut = new EventController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Event/Details/{id}");
 }
 public void CreatePostHasRouteAttrbiuteWithCorrectRoute()
 {
     var sut = new EventController(null, Mock.Of<IMediator>(), null);
     var routeAttribute = sut.GetAttributesOn(x => x.Create(It.IsAny<int>(), It.IsAny<EventEditViewModel>(), It.IsAny<IFormFile>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Event/Create/{campaignId}");
 }
 public void CreatePostHasValidateAntiForgeryTokenAttrbiute()
 {
     var sut = new EventController(null, Mock.Of<IMediator>(), null);
     var routeAttribute = sut.GetAttributesOn(x => x.Create(It.IsAny<int>(), It.IsAny<EventEditViewModel>(), It.IsAny<IFormFile>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void DetailsHasHttpGetAttribute()
 {
     var sut = new EventController(null, null, null);
     var attribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>())).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void RequestsHasRouteAttributeWithCorrectRoute()
 {
     var sut = new EventController(Mock.Of<IImageService>(), Mock.Of<IMediator>(), Mock.Of<IValidateEventDetailModels>());
     var routeAttribute = sut.GetAttributesOn(x => x.Requests(It.IsAny<int>(), null)).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Event/[action]/{id}/{status?}");
 }
 public void RequestsHasHttpGetAttribute()
 {
     var sut = new EventController(Mock.Of<IImageService>(), Mock.Of<IMediator>(), Mock.Of<IValidateEventDetailModels>());
     var attribute = sut.GetAttributesOn(x => x.Requests(It.IsAny<int>(), null)).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void PostEventFileHasHttpPostAttribute()
 {
     var sut = new EventController(null, null, null);
     var attribute = sut.GetAttributesOn(x => x.PostEventFile(It.IsAny<int>(), It.IsAny<IFormFile>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void MessageAllVolunteersHasValidateAntiForgeryTokenAttribute()
 {
     var sut = new EventController(null, Mock.Of<IMediator>(), null);
     var routeAttribute = sut.GetAttributesOn(x => x.MessageAllVolunteers(It.IsAny<MessageEventVolunteersViewModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void MessageAllVolunteersHasHttpPostAttribute()
 {
     var sut = new EventController(null, null, null);
     var attribute = sut.GetAttributesOn(x => x.MessageAllVolunteers(It.IsAny<MessageEventVolunteersViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void DeleteConfirmedHasValidateAntiForgeryTokenAttribute()
 {
     var sut = new EventController(null, Mock.Of<IMediator>(), null);
     var routeAttribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny<int>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void EditPostHasHttpPostAttribute()
 {
     var sut = new EventController(null, null, null);
     var attribute = sut.GetAttributesOn(x => x.Edit(It.IsAny<EventEditViewModel>(), It.IsAny<IFormFile>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }