public void DetailsHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/Details/{id}");
 }
 public void DetailsHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var routeAttribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/Details/{id}");
 }
 public void RemoveRequestHasRouteAttributeWithCorrectRouteValue()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.RemoveRequest(It.IsAny<RequestSummaryViewModel>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
     Assert.Equal(attribute.Template, "Admin/Itinerary/{itineraryId}/[Action]/{requestId}");
 }
 public void CreateHasHttpPostAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.Create(It.IsAny<ItineraryEditViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
Beispiel #5
0
 public void CreateHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var routeAttribute = sut.GetAttributesOn(x => x.Create(It.IsAny<ItineraryEditViewModel>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/Create");
 }
 public void AddTeamMemberHasValidateAntiForgeryAttribute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.AddTeamMember(It.IsAny<int>(), It.IsAny<int>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void EditPost_HasValidateAntiForgeryAttribute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.Edit(It.IsAny<ItineraryEditViewModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void MarkCompleteHasHttpPostAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.MarkComplete(It.IsAny<int>(), It.IsAny<Guid>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void RemoveTeamMemberHasValidateAntiForgeryTokenAttribute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var attribute = sut.GetAttributesOn(x => x.RemoveTeamMember(It.IsAny<int>(), It.IsAny<int>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void AddRequestsHasValidateAntiForgeryAttribute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var routeAttribute = sut.GetAttributesOn(x => x.AddRequests(It.IsAny<int>(), It.IsAny<string[]>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void SelectRequestsHasHttpGetAttribute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var attribute = sut.GetAttributesOn(x => x.SelectRequests(It.IsAny<int>())).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void CreateHasValidateAntiForgeryAttribute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var routeAttribute = sut.GetAttributesOn(x => x.Create(It.IsAny<ItineraryEditModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
 }
 public void MarkCompleteHasHttpPostAttribute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var attribute = sut.GetAttributesOn(x => x.MarkComplete(It.IsAny<int>(), It.IsAny<Guid>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void DetailsPost_HasHttpPostAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>(), It.IsAny<string>(), It.IsAny<RequestStatus?>()))
             .OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void RemoveTeamMemberHasValidateAntiForgeryTokenAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.RemoveTeamMember(It.IsAny<TaskSignupSummaryViewModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void RemoveTeamMemberHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var routeAttribute = sut.GetAttributesOn(x => x.RemoveTeamMember(It.IsAny<int>(), It.IsAny<int>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/{itineraryId}/[Action]/{taskSignupId}");
 }
 public void RemoveTeamMemberHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.RemoveTeamMember(It.IsAny<TaskSignupSummaryViewModel>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/{itineraryId}/[Action]/{taskSignupId}");
 }
 public void AddRequestsHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.AddRequests(It.IsAny<int>(), It.IsAny<List<string>>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/{id}/[Action]");
 }
 public void MarkCompleteHasRouteAttributeWithCorrectRoute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.MarkComplete(It.IsAny<int>(), It.IsAny<Guid>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/{itineraryId}/[Action]/{requestId}");
 }
 public void ConfirmRemoveRequestHasHttpGetAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.ConfirmRemoveRequest(It.IsAny<int>(), It.IsAny<Guid>())).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void EditPost_HasRouteAttribute_WithCorrectRoute()
 {
     var sut = new ItineraryController(null, null);
     var routeAttribute = sut.GetAttributesOn(x => x.Edit(It.IsAny<ItineraryEditViewModel>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(routeAttribute);
     Assert.Equal(routeAttribute.Template, "Admin/Itinerary/Edit/{id}");
 }
 public void ConfirmRemoveRequestHasRouteAttributeWithTheCorrectRouteValule()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.ConfirmRemoveRequest(It.IsAny<int>(), It.IsAny<Guid>())).OfType<RouteAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
     Assert.Equal(attribute.Template, "Admin/Itinerary/{itineraryId}/[Action]/{requestId}");
 }
 public void AddTeamMemberHasHttpPostAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.AddTeamMember(It.IsAny<int>(), It.IsAny<int>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void RemoveRequestHasHttpPostAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.RemoveRequest(It.IsAny<RequestSummaryViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
 public void SelectRequestsGetHasHttpGetAttribute()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributesOn(x => x.SelectRequests(It.IsAny<int>())).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
Beispiel #26
0
 public void CreateHasHttpPostAttribute()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var attribute = sut.GetAttributesOn(x => x.Create(It.IsAny<ItineraryEditViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }