public void RemoveSucession()
        {
            _source.AddRange(Enumerable.Range(1, 10));
            _source.ClearChanges();

            _source.ToArray().ForEach(i => _source.Remove(i));
            var changes = _source.CaptureChanges();

            _clone.Clone(changes);
            _clone.Should().BeEquivalentTo(_source);
        }
        public void RemoveSucession()
        {
            _source.AddRange(Enumerable.Range(1, 10));
            _source.ClearChanges();

            _source.ToArray().ForEach(i => _source.Remove(i));
            var changes = _source.CaptureChanges();

            _clone.Clone(changes);
            CollectionAssert.AreEqual(_source, _clone);
        }
Exemple #3
0
        public void AddSecond()
        {
            _list.Add(1);
            _list.ClearChanges();

            _list.Add(2);

            //assert changes
            var changes = _list.CaptureChanges();

            changes.Count.Should().Be(1);
            changes.Adds.Should().Be(1);
            changes.First().Item.Current.Should().Be(2);
            //assert collection
            _list.ShouldBeEquivalentTo(Enumerable.Range(1, 2));
        }
        public void AddSecond()
        {
            _list.Add(1);
            _list.ClearChanges();

            _list.Add(2);

            //assert changes
            var changes = _list.CaptureChanges();

            Assert.AreEqual(1, changes.Count);
            Assert.AreEqual(1, changes.Adds);
            Assert.AreEqual(2, changes.First().Item.Current);
            //assert collection
            CollectionAssert.AreEqual(Enumerable.Range(1, 2), _list);
        }