本文整理汇总了C#中AllReady.Areas.Admin.Controllers.TaskController.GetAttributesOn方法的典型用法代码示例。如果您正苦于以下问题:C# TaskController.GetAttributesOn方法的具体用法?C# TaskController.GetAttributesOn怎么用?C# TaskController.GetAttributesOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AllReady.Areas.Admin.Controllers.TaskController
的用法示例。
在下文中一共展示了TaskController.GetAttributesOn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteConfirmedHasHttpPostAttribute
public void DeleteConfirmedHasHttpPostAttribute()
{
var sut = new TaskController(null, Mock.Of<ITaskSummaryModelValidator>());
var attribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny<int>())).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例2: DeleteConfirmedHasActionNameAttributeWithCorrectActionName
public void DeleteConfirmedHasActionNameAttributeWithCorrectActionName()
{
var sut = new TaskController(null, Mock.Of<ITaskSummaryModelValidator>());
var attribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny<int>())).OfType<ActionNameAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
Assert.Equal(attribute.Name, "Delete");
}
示例3: EditPostHasValidateAntiForgeryTokenAttribute
public void EditPostHasValidateAntiForgeryTokenAttribute()
{
var sut = new TaskController(null, Mock.Of<ITaskSummaryModelValidator>());
var attribute = sut.GetAttributesOn(x => x.Edit(It.IsAny<TaskSummaryModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例4: DetailsHasRouteAttributeWithCorrectTemplate
public void DetailsHasRouteAttributeWithCorrectTemplate()
{
var sut = new TaskController(null, Mock.Of<ITaskSummaryModelValidator>());
var attribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>())).OfType<RouteAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
Assert.Equal(attribute.Template, "Admin/Task/Details/{id}");
}
示例5: AssignHasHttpPostAttribute
public void AssignHasHttpPostAttribute()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.Assign(It.IsAny<int>(), It.IsAny<List<string>>())).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例6: MessageAllVolunteersHasHttpPostAttribute
public void MessageAllVolunteersHasHttpPostAttribute()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.MessageAllVolunteers(It.IsAny<MessageTaskVolunteersViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例7: DeleteConfirmedHasActionNameAttributeWithCorrectActionName
public void DeleteConfirmedHasActionNameAttributeWithCorrectActionName()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny<DeleteViewModel>())).OfType<ActionNameAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
Assert.Equal(attribute.Name, "Delete");
}
示例8: CreatePostHasHttpGetAttribute
public void CreatePostHasHttpGetAttribute()
{
var sut = new TaskController(null);
var attribute = sut.GetAttributesOn(x => x.Create(It.IsAny<int>(), It.IsAny<TaskEditModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例9: EditPostHasHttpPostAttribute
public void EditPostHasHttpPostAttribute()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.Edit(It.IsAny<EditViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例10: DetailsHasHttpGetAttribute
public void DetailsHasHttpGetAttribute()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.Details(It.IsAny<int>())).OfType<HttpGetAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例11: EditGetHasRouteAttributeWithCorrectTemplate
public void EditGetHasRouteAttributeWithCorrectTemplate()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.Edit(It.IsAny<int>())).OfType<RouteAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
Assert.Equal(attribute.Template, "Admin/Task/Edit/{id}");
}
示例12: AssignHasValidateAntiForgeryTokenAttribute
public void AssignHasValidateAntiForgeryTokenAttribute()
{
var sut = new TaskController(null, Mock.Of<ITaskSummaryModelValidator>());
var attribute = sut.GetAttributesOn(x => x.Assign(It.IsAny<int>(), It.IsAny<List<string>>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例13: DeleteConfirmedHasValidateAntiForgeryTokenAttribute
public void DeleteConfirmedHasValidateAntiForgeryTokenAttribute()
{
var sut = new TaskController(null, null);
var attribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny<DeleteViewModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例14: MessageAllVolunteersHasValidateAntiForgeryTokenAttribute
public void MessageAllVolunteersHasValidateAntiForgeryTokenAttribute()
{
var sut = new TaskController(null, Mock.Of<ITaskSummaryModelValidator>());
var attribute = sut.GetAttributesOn(x => x.MessageAllVolunteers(It.IsAny<MessageTaskVolunteersModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例15: CreatePostHasRouteAttributeWithCorrectTemplate
public void CreatePostHasRouteAttributeWithCorrectTemplate()
{
var sut = new TaskController(null);
var attribute = sut.GetAttributesOn(x => x.Create(It.IsAny<int>(), It.IsAny<TaskEditModel>())).OfType<RouteAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
Assert.Equal(attribute.Template, "Admin/Task/Create/{activityId}");
}