Beispiel #1
0
        public void Serializable()
        {
            var decorator             = new ModificationCheckingCollectionDataDecorator(typeof(Order), new DomainObjectCollectionData(new[] { _order1, _order3 }));
            var deserializedDecorator = Serializer.SerializeAndDeserialize(decorator);

            Assert.That(deserializedDecorator.Count(), Is.EqualTo(2));
        }
Beispiel #2
0
        public override void SetUp()
        {
            base.SetUp();

            _factory           = DomainObjectCollectionFactory.Instance;
            _data              = new DomainObjectCollectionData();
            _dataWithOrderType = new ModificationCheckingCollectionDataDecorator(typeof(Order), _data);

            _orderA = DomainObjectMother.CreateFakeObject <Order> ();
            _orderB = DomainObjectMother.CreateFakeObject <Order> ();
        }
Beispiel #3
0
        public override void SetUp()
        {
            base.SetUp();

            _wrappedDataMock = MockRepository.GenerateMock <IDomainObjectCollectionData> ();
            _modificationCheckingDecorator = new ModificationCheckingCollectionDataDecorator(typeof(Order), _wrappedDataMock);
            _modificationCheckingDecoratorWithoutRequiredItemType = new ModificationCheckingCollectionDataDecorator(null, _wrappedDataMock);

            _order1     = DomainObjectIDs.Order1.GetObject <Order> ();
            _order3     = DomainObjectIDs.Order3.GetObject <Order> ();
            _orderItem1 = DomainObjectIDs.OrderItem1.GetObject <OrderItem>();
        }