public void Setup() { SourceAccessor = new ValueAccessorStub <ChildSource>(); Behavior = new WrapperViewModelAccessorBehavior <ChildVM, ChildSource>(); Context = PropertyStub .WithBehaviors(Behavior, SourceAccessor, new ServiceLocatorValueFactoryBehavior <ChildVM>()) .GetContext(); }
public void Setup() { _sourceCollectionAccessor = new ValueAccessorStub <IEnumerable <ItemSource> >(); Behavior = new SynchronizerCollectionBehavior <ItemVM, ItemSource>(); SetupFixture( Behavior, _sourceCollectionAccessor ); }
public void Setup() { ValueAccessor = new ValueAccessorStub <ChildVM>(); Behavior = new DelegateViewModelAccessorBehavior <ChildVM>(); Property = PropertyStub .WithBehaviors(Behavior, ValueAccessor) .Build(); Context = ViewModelStub .WithProperties(Property) .BuildContext(); }
public void Setup() { Behavior = new ViewModelPropertyDescendantsValidatorBehavior <ChildVM>(); ViewModelPropertyAccessor = new ValueAccessorStub <ChildVM>(); ViewModelPropertyAccessor.Value = new ChildVM(); var property = PropertyStub .WithBehaviors(Behavior, Next, ViewModelPropertyAccessor) .Of <string>(); Context = CreateBehaviorContextFor(property); }
public void Setup() { Behavior = new CollectionPropertyDescendantsValidatorBehavior <ViewModelStub>(); ViewModelPropertyAccessor = new ValueAccessorStub <IVMCollection <ViewModelStub> >(); ViewModelPropertyAccessor.Value = VMCollectionStub.Build(); var property = PropertyStub .WithBehaviors(Behavior, Next, ViewModelPropertyAccessor) .Of <string>(); Context = CreateBehaviorContextFor(property); }
private static IValueAccessorBehavior <IEnumerable <ItemSource> > CreateSourceCollectionAccessor( IEnumerable <ItemSource> sourceItems ) { return(ValueAccessorStub.WithInitialValue(sourceItems)); }