当前位置: 首页>>代码示例>>C#>>正文


C# TaskController.GetAttributesOn方法代码示例

本文整理汇总了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);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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");
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:7,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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}");
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:7,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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");
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:7,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:pottereric,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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}");
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:7,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:TaskControllerTests.cs

示例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}");
 }
开发者ID:mmoore99,项目名称:allReady,代码行数:7,代码来源:TaskControllerTests.cs


注:本文中的AllReady.Areas.Admin.Controllers.TaskController.GetAttributesOn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。