public void ShouldBeAbleToConfigureValidationAfterInstantiation()
        {
            var observable = new Observable<int>();

            var errorMessage = "Value can't be zero.";
            observable.Configure(x => x.Validators.Add(i => i == 0 ? errorMessage : string.Empty));

            observable.Error.ShouldBe(errorMessage);
        }
Exemplo n.º 2
0
        public void ShouldBeAbleToConfigureValidationAfterInstantiation()
        {
            var observable = new Observable <int>();

            var errorMessage = "Value can't be zero.";

            observable.Configure(x => x.Validators.Add(i => i == 0 ? errorMessage : string.Empty));

            observable.Error.ShouldBe(errorMessage);
        }