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); }
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); }
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); }
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); }
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); }
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); }
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); }