public void Serializable() { var source = new TestableObservableCollectionDataDecorator(new DomainObjectCollectionData(), null); source.Insert(0, _order1); source.Insert(1, _order3); source.Insert(2, _order4); var result = Serializer.SerializeAndDeserialize(source); Assert.That(result.Count, Is.EqualTo(3)); }
public override void SetUp() { base.SetUp(); _mockRepository = new MockRepository(); _order1 = DomainObjectIDs.Order1.GetObject <Order> (); _order3 = DomainObjectIDs.Order3.GetObject <Order> (); _order4 = DomainObjectIDs.Order4.GetObject <Order> (); _order5 = DomainObjectIDs.Order5.GetObject <Order> (); var realContent = new DomainObjectCollectionData(new[] { _order1, _order3, _order4 }); _eventSinkMock = _mockRepository.StrictMock <TestableObservableCollectionDataDecorator.IEventSink>(); _observableDecoratorWithRealContent = new TestableObservableCollectionDataDecorator(realContent, _eventSinkMock); _eventSinkMock.Replay(); }