public void LimitClauseAfterWithClauseIsUntyped()
        {
            // Arrange
            var client = Substitute.For<IRawGraphClient>();
            var query = new CypherFluentQuery(client)
                .Start(new { n = new NodeReference(3) })
                .With("foo")
                .Limit(2);

            // Assert
            var implementsTypedQueryInterface = query
                .GetType()
                .GetInterfaces()
                .Where(i => i.IsGenericType)
                .Select(i => i.GetGenericTypeDefinition())
                .Any(t => t == typeof(ICypherFluentQuery<>));
            Assert.IsFalse(implementsTypedQueryInterface, "Implementes ICypherFluentQuery<>");
        }
        //[Description("https://bitbucket.org/Readify/neo4jclient/issue/140/support-multiple-limit-order-by-clauses-in")]
        public void LimitClauseAfterWithClauseIsUntyped()
        {
            // Arrange
            var client = Substitute.For <IRawGraphClient>();
            var query  = new CypherFluentQuery(client)
                         .Match("n")
                         .With("foo")
                         .Limit(2);

            // Assert
            var implementsTypedQueryInterface = query
                                                .GetType()
                                                .GetInterfaces()
                                                .Where(i => i.IsGenericType)
                                                .Select(i => i.GetGenericTypeDefinition())
                                                .Any(t => t == typeof(ICypherFluentQuery <>));

            Assert.False(implementsTypedQueryInterface, "Implements ICypherFluentQuery<>");
        }
示例#3
0
        //[Description("https://bitbucket.org/Readify/neo4jclient/issue/140/support-multiple-limit-order-by-clauses-in")]
        public void SkipClauseAfterWithClauseIsUntyped()
        {
            // Arrange
            var client = Substitute.For <IRawGraphClient>();
            var query  = new CypherFluentQuery(client)
                         .Start(new { n = new NodeReference(3) })
                         .With("foo")
                         .Skip(2);

            // Assert
            Assert.IsAssignableFrom <ICypherFluentQuery>(query);
            var implementsTypedQueryInterface = query
                                                .GetType()
                                                .GetInterfaces()
                                                .Where(i => i.IsGenericType)
                                                .Select(i => i.GetGenericTypeDefinition())
                                                .Any(t => t == typeof(ICypherFluentQuery <>));

            Assert.False(implementsTypedQueryInterface, "Implementes ICypherFluentQuery<>");
        }