public void MoveWithinSamePage()
        {
            var people = _generator.Take(100).ToArray();
            _source.AddRange(people);
            var personToMove = people[0];
            _source.Move(0, 10);

            var actualPersonAtIndex10 = _results.Data.Items.ElementAt(10);
            Assert.AreEqual(personToMove, actualPersonAtIndex10);
        }
Exemple #2
0
        public void Move()
        {
            //Move should have no effect

            var child4           = new PersonWithRelations("Child4", 1);
            var child5           = new PersonWithRelations("Child5", 2);
            var anotherRelative1 = new PersonWithRelations("Another1", 2, new[] { child4, child5 });
            var child6           = new PersonWithRelations("Child6", 1);
            var child7           = new PersonWithRelations("Child7", 2);
            var anotherRelative2 = new PersonWithRelations("Another2", 2, new[] { child6, child7 });

            _source.AddRange(new[] { anotherRelative1, anotherRelative2 });

            _results.Messages.Count.Should().Be(1);
            _source.Move(1, 0);
            _results.Messages.Count.Should().Be(1);
        }
Exemple #3
0
 public void Move()
 {
     _source.AddRange(Enumerable.Range(1, 5));
     _source.Move(4, 1);
     _results.Data.Items.ShouldAllBeEquivalentTo(new[] { 4, 3, 2, 5, 1 });
 }
 public void Move()
 {
     _source.AddRange(Enumerable.Range(1, 5));
     _source.Move(4, 1);
     CollectionAssert.AreEquivalent(new[] { 4, 3, 2, 5, 1 }, _results.Data.Items);
 }