public override void SetUp()
        {
            base.SetUp();

            _order1 = DomainObjectIDs.Order1.GetObject <Order> ();

            var realContent = new DomainObjectCollectionData();

            _observableDecorator = new ObservableCollectionDataDecorator(realContent);
        }
Exemplo n.º 2
0
        public ChangeCachingCollectionDataDecorator(IDomainObjectCollectionData wrappedData)
            : base(new ObservableCollectionDataDecorator(ArgumentUtility.CheckNotNull("wrappedData", wrappedData)))
        {
            _observedWrappedData   = (ObservableCollectionDataDecorator)WrappedData;
            _unobservedWrappedData = wrappedData;

            _originalData = new CopyOnWriteDomainObjectCollectionData(_observedWrappedData);
            _observedWrappedData.CollectionChanged += WrappedData_CollectionChanged();

            _isCacheUpToDate      = true;
            _cachedHasChangedFlag = false;
        }
        public override void SetUp()
        {
            base.SetUp();

            _domainObject1 = DomainObjectMother.CreateFakeObject <Order> ();
            _domainObject2 = DomainObjectMother.CreateFakeObject <Order> ();
            _domainObject3 = DomainObjectMother.CreateFakeObject <Order> ();

            _underlyingCopiedData = new DomainObjectCollectionData(new[] { _domainObject1, _domainObject2 });
            _copiedData           = new ObservableCollectionDataDecorator(_underlyingCopiedData);
            _copyOnWriteData      = new CopyOnWriteDomainObjectCollectionData(_copiedData);
        }