public GraphClient CreateGraphClient(Neo4jVersion neoVersion) { if (!recordedResponses.Keys.Any(r => r.Resource == "" || r.Resource == "/")) { MockResponse response; switch (neoVersion) { case Neo4jVersion.Neo19: response = MockResponse.NeoRoot(1, 9, 0); break; case Neo4jVersion.Neo20: response = MockResponse.NeoRoot20(); break; case Neo4jVersion.Neo22: response = MockResponse.NeoRoot(2, 2, 0); break; case Neo4jVersion.Neo225: response = MockResponse.NeoRoot(2, 2, 5); break; case Neo4jVersion.Neo226: response = MockResponse.NeoRoot(2, 2, 6); break; case Neo4jVersion.Neo23: response = MockResponse.NeoRoot(2, 3, 0); break; case Neo4jVersion.Neo30: response = MockResponse.NeoRoot(3, 0, 0); break; case Neo4jVersion.Neo40: response = MockResponse.NeoRoot(4, 0, 0); break; default: throw new ArgumentOutOfRangeException(nameof(neoVersion), neoVersion, null); } Add(MockRequest.Get(""), response); } var httpClient = GenerateHttpClient(BaseUri); var graphClient = new GraphClient(new Uri(BaseUri), httpClient); return(graphClient); }