public void IgnorePreviousValidationResult()
        {
            var viewModel   = new ValidatableViewModelStub();
            var isFirstCall = true;
            var task        = Task.Run(async() =>
            {
                await Task.Delay(1000);

                return(new List <string> {
                    "First Error!!!!"
                });
            });

            viewModel.RegisterValidator(() => viewModel.PropertyToValidate1, () =>
            {
                if (isFirstCall)
                {
                    isFirstCall = false;

                    return(task);
                }

                return(Task.FromResult(new List <string> {
                    "Second Error!!!!"
                }));
            });

            viewModel.Validate("PropertyToValidate1");
            viewModel.Validate("PropertyToValidate1");
            task.Wait();
            var errors = viewModel.GetErrors();

            Assert.AreEqual("Second Error!!!!", errors[0]);
        }
        private ValidatableViewModelStub CreateTestViewModel(List <string> property1Errors, List <string> property2Errors)
        {
            var viewModel = new ValidatableViewModelStub();

            viewModel.RegisterValidator(() => viewModel.PropertyToValidate1, () => Task.FromResult(property1Errors));
            viewModel.RegisterValidator(() => viewModel.PropertyToValidate2, () => Task.FromResult(property2Errors));

            return(viewModel);
        }