Пример #1
0
        public void Create_WithEnumerable_ArgumentIsCorrectlyPassed()
        {
            // arrange
            // act
            var data = new PageableData <string>(new[] { "a", "b" });

            // assert
            Assert.Collection(data.Source,
                              t => Assert.Equal("a", t),
                              t => Assert.Equal("b", t));
            Assert.Null(data.Properties);
        }
Пример #2
0
        public void Create_WithQueryableAndProps_ArgumentIsCorrectlyPassed()
        {
            // arrange
            // act
            var data = new PageableData <string>(
                new[] { "a", "b" }.AsQueryable(),
                new Dictionary <string, object> {
                { "a", "b" }
            });

            // assert
            Assert.Collection(data.Source,
                              t => Assert.Equal("a", t),
                              t => Assert.Equal("b", t));
            Assert.Collection(data.Properties,
                              t =>
            {
                Assert.Equal("a", t.Key);
                Assert.Equal("b", t.Value);
            });
        }