Exemplo n.º 1
0
        public void Should_filter_when_property_types_match_as_range_datetime()
        {
            var results = fixture.GetDatabaseInstance().Query <Person>().Filter(new
            {
                FavoriteDate = Range.FromString <DateTime>("[2000-01-01,2000-01-02)")
            });

            Assert.NotNull(results);
            Assert.Equal(1, results.Count());
            Assert.Equal("John", results.First().FirstName);
        }
Exemplo n.º 2
0
        public void Should_filter_when_property_types_match_as_range_char()
        {
            var results = fixture.GetDatabaseInstance().Query <Person>().Filter(new
            {
                FavoriteLetter = Range.FromString <char>("[a,b)")
            });

            Assert.NotNull(results);
            Assert.Equal(1, results.Count());
            Assert.Equal("John", results.First().FirstName);
        }
Exemplo n.º 3
0
        public void Should_filter_open_ended_upper_bound(string value)
        {
            var results = fixture.GetDatabaseInstance().Query <Person>().Filter(new
            {
                FavoriteNumber = Range.FromString <int>(value)
            });

            Assert.NotNull(results);
            Assert.Equal(1, results.Count());
            Assert.Equal("Tim", results.First().FirstName);
        }
        public void Should_filter_when_property_types_match_as_range_char()
        {
            var @return = fixture.GetDatabaseInstance()
                          .With <Person>("where /**where**/")
                          .Fetch(new
            {
                FavoriteLetter = Range.FromString <char>("[a,b)")
            });

            Assert.NotNull(@return);
            Assert.Single(@return);
            Assert.Equal("John", @return.First().FirstName);
        }
        public void Should_filter_open_ended_upper_bound(string value)
        {
            var @return = fixture.GetDatabaseInstance()
                          .With <Person>("where /**where**/")
                          .Fetch(new
            {
                FavoriteNumber = Range.FromString <int>(value)
            });

            Assert.NotNull(@return);
            Assert.Single(@return);
            Assert.Equal("Tim", @return.First().FirstName);
        }
        public void Should_filter_when_property_types_match_as_range_datetimeoffset()
        {
            var @return = fixture.GetDatabaseInstance()
                          .With <Person>("where /**where**/")
                          .Fetch(new
            {
                FavoriteDateTimeOffset = Range.FromString <DateTimeOffset>("[2010-01-01,2010-01-02)")
            });

            Assert.NotNull(@return);
            Assert.Single(@return);
            Assert.Equal("John", @return.First().FirstName);
        }