protected QueryDeserializationTest(IConfigurableGremlinQuerySource g, ITestOutputHelper testOutputHelper, [CallerFilePath] string callerFilePath = "") : base( g .ConfigureEnvironment(env => env .UseExecutor(GremlinQueryExecutor.Create((_, _) => { var context = XunitContext.Context; var prefix = context.ClassName.Substring(0, context.ClassName.Length - "DeserializationTests".Length); try { var jArray = JsonConvert.DeserializeObject <JArray>( File.ReadAllText(System.IO.Path.Combine(context.SourceDirectory, prefix + "IntegrationTests." + XunitContext.Context.MethodName + ".verified.txt"))); return(jArray .Select(x => (object)x) .ToAsyncEnumerable()); } catch (IOException) { return(AsyncEnumerable.Empty <object>()); } }))), testOutputHelper, callerFilePath) { }
protected Fixture(string sourcePrefix, IGremlinQuerySource source) : base(source .ConfigureEnvironment(env => env .UseExecutor(GremlinQueryExecutor.Create((_, _) => { var context = XunitContext.Context; try { var jArray = JsonConvert.DeserializeObject <JArray>( File.ReadAllText(System.IO.Path.Combine(context.SourceDirectory, sourcePrefix + "." + context.MethodName + ".verified.txt"))); return(jArray? .Select(x => (object)x) .ToAsyncEnumerable() ?? AsyncEnumerable.Empty <object>()); } catch (IOException) { return(AsyncEnumerable.Empty <object>()); } })))) { }