Ejemplo n.º 1
0
        protected static ViewModelStub CreateInvalidVM(ValidationResult validationResult)
        {
            var behavior = new ValidationResultAggregatorStub();

            behavior.ReturnedValidationResults[ValidationResultScope.All] = validationResult;

            return(ViewModelStub
                   .WithBehaviors(behavior)
                   .Build());
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            Next = new ValidationResultAggregatorStub();
            Next.ReturnedValidationResults[ValidationResultScope.PropertiesOnly]           = PropertyResult;
            Next.ReturnedValidationResults[ValidationResultScope.ViewModelValidationsOnly] = ViewModelResult;
            Next.ReturnedValidationResults[ValidationResultScope.Descendants] = DescendantResult;

            Behavior = new ValidationResultAggregatorCacheBehavior();

            Counter = new NextAggregatorInvocationCounter();

            Context = ViewModelStub
                      .WithBehaviors(Behavior, Counter, Next)
                      .BuildContext();
        }