本文整理汇总了C#中AllReady.Areas.Admin.Controllers.SiteController.GetAttributesOn方法的典型用法代码示例。如果您正苦于以下问题:C# SiteController.GetAttributesOn方法的具体用法?C# SiteController.GetAttributesOn怎么用?C# SiteController.GetAttributesOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AllReady.Areas.Admin.Controllers.SiteController
的用法示例。
在下文中一共展示了SiteController.GetAttributesOn方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RevokeOrganizationAdminHasHttpGetAttribute
public void RevokeOrganizationAdminHasHttpGetAttribute()
{
var controller = new SiteController(null, null,null);
var attribute = controller.GetAttributesOn(x => x.RevokeOrganizationAdmin(It.IsAny<string>())).OfType<HttpGetAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例2: DeleteUserHasHttpGetAttribute
public void DeleteUserHasHttpGetAttribute()
{
var controller = new SiteController(null, null, null);
var attribute = controller.GetAttributesOn(x => x.DeleteUser(It.IsAny<string>())).OfType<HttpGetAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例3: AssignOrganizationAdminPostHasValidateAntiForgeryTokenAttribute
public void AssignOrganizationAdminPostHasValidateAntiForgeryTokenAttribute()
{
var controller = new SiteController(null, null, null);
var attribute = controller.GetAttributesOn(x => x.AssignOrganizationAdmin(It.IsAny<AssignOrganizationAdminModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例4: AssignOrganizationAdminPostHasHttpPostAttribute
public void AssignOrganizationAdminPostHasHttpPostAttribute()
{
var mediator = new Mock<IMediator>();
var controller = new SiteController(null, null, mediator.Object);
var model = new AssignOrganizationAdminModel { UserId = It.IsAny<string>(), OrganizationId = It.IsAny<int>() };
var attribute = controller.GetAttributesOn(x => x.AssignOrganizationAdmin(model)).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例5: EditUserPostHasValidateAntiForgeryTokenAttribute
public void EditUserPostHasValidateAntiForgeryTokenAttribute()
{
var controller = new SiteController(null, null, null);
var attribute = controller.GetAttributesOn(x => x.EditUser(It.IsAny<EditUserModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例6: ConfirmDeletUserHasValidateAntiForgeryTokenAttribute
public void ConfirmDeletUserHasValidateAntiForgeryTokenAttribute()
{
var controller = new SiteController(null, null, null);
var attribute = controller.GetAttributesOn(x => x.ConfirmDeleteUser(It.IsAny<string>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}
示例7: EditUserPostHasHttpPostAttribute
public void EditUserPostHasHttpPostAttribute()
{
var controller = new SiteController(null, null, null);
var attribute = controller.GetAttributesOn(x => x.EditUser(It.IsAny<EditUserViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
Assert.NotNull(attribute);
}