예제 #1
0
        public void Should_make_query_with_number_and_list()
        {
            var filter = ClrFilter.In("Version", new List <long> {
                0L, 2L, 5L
            });

            AssertQuery("{ 'Version' : { '$in' : [NumberLong(0), NumberLong(2), NumberLong(5)] } }", filter);
        }
예제 #2
0
        public void Should_make_query_with_version_and_list()
        {
            var i = F(ClrFilter.In("version", new List <long> {
                0L, 2L, 5L
            }));
            var o = C("{ 'vs' : { '$in' : [NumberLong(0), NumberLong(2), NumberLong(5)] } }");

            Assert.Equal(o, i);
        }
예제 #3
0
        public void Should_make_query_with_id_string_list()
        {
            var id = DomainId.NewGuid().ToString();

            var filter = ClrFilter.In("Id", new List <string> {
                id
            });

            AssertQuery("{ '_id' : { '$in' : ['[value]'] } }", filter, id);
        }
예제 #4
0
        public void Should_make_query_with_id_guid_list()
        {
            var id = Guid.NewGuid();

            var filter = ClrFilter.In("Id", new List <Guid> {
                id
            });

            AssertQuery("{ '_id' : { '$in' : ['[value]'] } }", filter, id);
        }
예제 #5
0
        public void Should_make_query_with_id_string_list()
        {
            var id = DomainId.NewGuid().ToString();

            var filter = ClrFilter.In("id", new List <string> {
                id
            });

            AssertQuery($"{{ '_id' : {{ '$in' : ['{appId}--{id}'] }} }}", filter);
        }
예제 #6
0
        public void Should_make_query_with_id_list()
        {
            var id = Guid.NewGuid();

            var filter = ClrFilter.In("id", new List <Guid> {
                id
            });

            AssertQuery($"{{ '_id' : {{ '$in' : ['{appId}--{id}'] }} }}", filter);
        }
예제 #7
0
        public void Should_make_query_with_id_string_list()
        {
            var id = Guid.NewGuid().ToString();

            var i = F(ClrFilter.In("id", new List <string> {
                id
            }));
            var o = C($"{{ '_id' : {{ '$in' : ['{id}'] }} }}");

            Assert.Equal(o, i);
        }
예제 #8
0
        public void Should_make_query_with_id_list()
        {
            var id = Guid.NewGuid();

            var i = _F(ClrFilter.In("id", new List <Guid> {
                id
            }));
            var o = _C($"{{ 'id' : {{ '$in' : ['{id}'] }} }}");

            Assert.Equal(o, i);
        }