public async Task AssertNextIsNotCalledWhenNotSuccessful() { validatorMock.RuleFor(m => m).Custom((property, context) => { context.AddFailure("Property", "Error"); }); try { var token = new CancellationToken(); await validationPipelineBehavior.Handle(requestMock, token, nextMock); } catch { // we aren't testing if this method throws } await nextMock.DidNotReceive().Invoke(); }