public void TestPlannerWithCypherPlannerVariant(CypherPlanner input, string expected) { var client = Substitute.For <IRawGraphClient>(); client.CypherCapabilities.Returns(CypherCapabilities.Cypher22); var query = new CypherFluentQuery(client) .Planner(input) .Query; Assert.Equal(string.Format("PLANNER {0}", expected), query.QueryText); }
public void TestPlannerWithCypherPlannerVariant( [Values(CypherPlanner.CostGreedy, CypherPlanner.CostIdp, CypherPlanner.Rule)] CypherPlanner input, [Values("COST", "IDP", "RULE")] string expected) { var client = Substitute.For <IRawGraphClient>(); client.CypherCapabilities.Returns(CypherCapabilities.Cypher22); var query = new CypherFluentQuery(client) .Planner(input) .Query; Assert.AreEqual(string.Format("PLANNER {0}", expected), query.QueryText); }
public ICypherFluentQuery Planner(CypherPlanner planner) { switch (planner) { case CypherPlanner.Rule: return(Planner("RULE")); case CypherPlanner.CostIdp: return(Planner("IDP")); case CypherPlanner.CostGreedy: return(Planner("COST")); default: throw new ArgumentOutOfRangeException("planner", planner, null); } }
public virtual ICypherFluentQuery Planner(CypherPlanner planner) { return(this); }