コード例 #1
0
 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
0
 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
0
 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
0
        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
0
 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
0
        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
0
 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);
 }