public async Task ValidateHandleAsync_Failure() { // Arrange this.memberValidationService .Setup(svc => svc.ValidateMemberAsync(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())) .ReturnsAsync(() => false); this.authContext = FakeHttpContext.GetAuthorizationHandlerContextForModerator(); // Act await this.policyHandler.HandleAsync(this.authContext); // Assert Assert.IsFalse(this.authContext.HasSucceeded); }