本文整理汇总了C#中AllReady.Areas.Admin.Controllers.ItineraryController.GetAttributesOn方法的典型用法代码示例。如果您正苦于以下问题:C# ItineraryController.GetAttributesOn方法的具体用法?C# ItineraryController.GetAttributesOn怎么用?C# ItineraryController.GetAttributesOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AllReady.Areas.Admin.Controllers.ItineraryController
的用法示例。
在下文中一共展示了ItineraryController.GetAttributesOn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetailsHasRouteAttributeWithCorrectRoute
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}");
}
示例2: DetailsHasRouteAttributeWithCorrectRoute
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}");
}
示例3: RemoveRequestHasRouteAttributeWithCorrectRouteValue
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}");
}
示例4: CreateHasHttpPostAttribute
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);
}
示例5: AddTeamMemberHasValidateAntiForgeryAttribute
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);
}
示例6: EditPost_HasValidateAntiForgeryAttribute
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);
}
示例7: MarkCompleteHasHttpPostAttribute
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);
}
示例8: RemoveTeamMemberHasValidateAntiForgeryTokenAttribute
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);
}
示例9: AddRequestsHasValidateAntiForgeryAttribute
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);
}
示例10: SelectRequestsHasHttpGetAttribute
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);
}
示例11: CreateHasValidateAntiForgeryAttribute
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);
}
示例12: MarkCompleteHasHttpPostAttribute
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);
}
示例13: DetailsPost_HasHttpPostAttribute
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);
}
示例14: RemoveTeamMemberHasValidateAntiForgeryTokenAttribute
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);
}
示例15: RemoveTeamMemberHasRouteAttributeWithCorrectRoute
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}");
}