Exemplo n.º 1
0
        public void RestAPIFormatTest()
        {
            RestTraversal r   = new RestTraversal();
            string        qry = r.Order(OrderType.breadth_first)
                                .Filter(new PropertyFilter().SetPropertyName("FirstName").Contains("sony"))
                                .RelationShips(RelationshipDirection.out_direction, "wife")
                                .RelationShips(RelationshipDirection.all_direction, "loves")
                                .Uniqueness(UniquenessType.node_global)
                                .MaxDepth(2)
                                .ToString();

            Console.WriteLine(qry);

            Assert.AreEqual(this.GetTestRestQuery(), qry);
        }
Exemplo n.º 2
0
        public void REST_Traversal_Test()
        {
            Node node = Node.Get(19);

            Assert.IsNotNull(node);
            RestTraversal r = new RestTraversal();

            r.Order(OrderType.breadth_first)
            .Filter(new PropertyFilter().SetPropertyName("FirstName").Contains("marry"))
            .RelationShips(RelationshipDirection.out_direction, "wife")
            .RelationShips(RelationshipDirection.all_direction, "loves")
            .Uniqueness(UniquenessType.node_global)
            .MaxDepth(2);
            IList <Node> nodes = node.Filter(r);

            Assert.IsTrue(nodes.Count > 0);
        }