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)); }
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> (); }
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>(); }