Пример #1
0
        public void Paged_Add()
        {
            // Arrange
            var items    = new[] { new User(Guid.NewGuid(), "one", "one"), new User(Guid.NewGuid(), "two", "two") };
            var page     = 2;
            var quantity = 4;
            var total    = 6;
            var paged    = new Paged <User>(items, page, quantity, total);

            // Act
            paged.Add(new User(Guid.NewGuid(), "three", "three"));

            // Assert
            paged.Count().Should().Be(3);
        }
Пример #2
0
        public void Paged_Add()
        {
            // Arrange
            var items    = new[] { EntityHelper.CreateUser("one"), EntityHelper.CreateUser("two") };
            var page     = 2;
            var quantity = 4;
            var total    = 6;
            var paged    = new Paged <PimsUser>(items, page, quantity, total);

            // Act
            paged.Add(EntityHelper.CreateUser("three"));

            // Assert
            paged.Count().Should().Be(3);
        }