コード例 #1
0
        public void Setup()
        {
            ItemDescriptor = DescriptorStub.Build();
            Behavior       = new ItemInitializerBehavior <IViewModel>();

            SetupFixture(Behavior, new ItemDescriptorProviderBehavior(ItemDescriptor));
        }
コード例 #2
0
 private TestViewModel(
     PropertyStub <string> property,
     TestRevalidationBehavior viewModelBehavior
     )
     : base(DescriptorStub
            .WithBehaviors(viewModelBehavior)
            .WithProperties(property)
            .Build()
            )
 {
     Property = property;
 }
コード例 #3
0
            public TestVM()
            {
                NextChangeHandler = new NextChangeHandlerBehavior();
                Behavior          = new CachingValidationResultAggregatorBehavior();

                FirstProperty = PropertyStub
                                .WithBehaviors(_firstPropertyResultProvider)
                                .Of <object>();

                SecondProperty = PropertyStub
                                 .WithBehaviors(_secondPropertyResultProvider)
                                 .Of <ViewModelStub>();

                Descriptor = DescriptorStub
                             .WithProperties(FirstProperty, SecondProperty)
                             .WithBehaviors(Behavior, _viewModelResultProvider, NextChangeHandler)
                             .Build();
            }
コード例 #4
0
 public ChildVM(RefreshDetectorBehavior behavior)
     : base(DescriptorStub
            .WithBehaviors(behavior)
            .Build())
 {
 }
 private ChildVM(RevalidationBehaviorStub revalidationBehavior)
     : base(DescriptorStub.WithBehaviors(revalidationBehavior).Build())
 {
     RevalidationBehavior = revalidationBehavior;
 }
コード例 #6
0
 public ItemVM() :
     base(DescriptorStub.WithBehaviors(new RefreshMock()).Build())
 {
 }
コード例 #7
0
 private ViewModelWithValidatorExecutor(ValidatorExecutorBehavior behavior)
     : base(DescriptorStub.WithBehaviors(behavior).Build())
 {
     Behavior = behavior;
 }
コード例 #8
0
 private ViewModelSpy(RevalidationSpy spy, string description)
     : base(DescriptorStub.WithBehaviors(spy).Build(), description)
 {
     _spy = spy;
 }