public void Handle_ResetPasswordFailed_ThrowResetPasswordException() { var request = new ResetPasswordRequest(); passwordManager.Setup(pm => pm.ResetPassword(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())) .ReturnsAsync(false); Assert.That(() => resetPasswordCommand.Handle(request, It.IsAny <CancellationToken>()), Throws.TypeOf <ResetPasswordException>()); }