diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.TimeSpan_from_malformed_string.verified.txt b/test/Providers.GremlinServer.Tests/IntegrationTests.TimeSpan_from_malformed_string.verified.txt deleted file mode 100644 index 59d3171df..000000000 --- a/test/Providers.GremlinServer.Tests/IntegrationTests.TimeSpan_from_malformed_string.verified.txt +++ /dev/null @@ -1,101 +0,0 @@ -{ - Type: GremlinQueryExecutionException, - ExecutionContext: { - ExecutionId: 12345678-9012-3456-7890-123456789012, - Query: {} - }, - Message: Executing query 12345678-9012-3456-7890-123456789012 failed., - Data: {}, - InnerException: { - $type: FormatException, - Type: FormatException, - Message: The string 'abc' is not a valid TimeSpan value., - Data: {}, - StackTrace: -at System.Xml.XmlConvert.ToTimeSpan(String s) -at ExRam.Gremlinq.Support.NewtonsoftJson.TimeSpanConverterFactory.Convert(JValue jValue, IGremlinQueryEnvironment environment, ITransformer recurse) -at ExRam.Gremlinq.Support.NewtonsoftJson.FixedTypeConverterFactory`1.FixedTypeConverter.TryConvert(JValue serialized, ITransformer defer, ITransformer recurse, TStaticTarget& value) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.<>c__DisplayClass8_0`3.b__1(TStaticSource staticSerialized) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.TryTransform[TSource,TTarget](TSource source, IGremlinQueryEnvironment environment, TTarget& value) -at ExRam.Gremlinq.Support.NewtonsoftJson.EnumerableConverterFactory.EnumerableConverter`1.GetEnumerable(JArray source, ITransformer recurse) -at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) -at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) -at ExRam.Gremlinq.Support.NewtonsoftJson.EnumerableConverterFactory.ListConverter`2.TryConvert(JArray serialized, ITransformer defer, ITransformer recurse, TTarget& value) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.<>c__DisplayClass8_0`3.b__1(TStaticSource staticSerialized) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.TryTransform[TSource,TTarget](TSource source, IGremlinQueryEnvironment environment, TTarget& value) -at ExRam.Gremlinq.Support.NewtonsoftJson.TypedValueConverterFactory.TypedValueConverter`1.TryConvert(JObject serialized, ITransformer defer, ITransformer recurse, TTarget& value) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.<>c__DisplayClass8_0`3.b__1(TStaticSource staticSerialized) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.TryTransform[TSource,TTarget](TSource source, IGremlinQueryEnvironment environment, TTarget& value) -at ExRam.Gremlinq.Support.NewtonsoftJson.TransformerExtensions.FluentForType.<>c__7`2.b__7_0(ITransformer deserializer, TSource serialized, IGremlinQueryEnvironment environment) -at ExRam.Gremlinq.Support.NewtonsoftJson.TransformerExtensions.FluentForType.From[TSource](TSource source, IGremlinQueryEnvironment environment) -at ExRam.Gremlinq.Support.NewtonsoftJson.NewtonsoftJsonSerializerConverterFactory.GraphsonJsonSerializer.JTokenConverterConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) -at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) -at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) -at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) -at Newtonsoft.Json.Linq.JToken.ToObject[T](JsonSerializer jsonSerializer) -at ExRam.Gremlinq.Support.NewtonsoftJson.NewtonsoftJsonSerializerConverterFactory.GraphsonJsonSerializer.Deserialize[T](JToken token) -at ExRam.Gremlinq.Support.NewtonsoftJson.NewtonsoftJsonSerializerConverterFactory.NewtonsoftJsonSerializerConverter`2.TryConvert(TSource source, ITransformer defer, ITransformer recurse, TTarget& value) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.<>c__DisplayClass8_0`3.b__1(TStaticSource staticSerialized) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.TryTransform[TSource,TTarget](TSource source, IGremlinQueryEnvironment environment, TTarget& value) -at ExRam.Gremlinq.Support.NewtonsoftJson.TransformerExtensions.FluentForType.<>c__7`2.b__7_0(ITransformer deserializer, TSource serialized, IGremlinQueryEnvironment environment) -at ExRam.Gremlinq.Support.NewtonsoftJson.TransformerExtensions.FluentForType.From[TSource](TSource source, IGremlinQueryEnvironment environment) -at ExRam.Gremlinq.Support.NewtonsoftJson.NewtonsoftJsonSerializerConverterFactory.GraphsonJsonSerializer.JTokenConverterConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) -at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) -at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) -at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) -at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer) -at Newtonsoft.Json.Linq.JToken.ToObject[T](JsonSerializer jsonSerializer) -at ExRam.Gremlinq.Support.NewtonsoftJson.NewtonsoftJsonSerializerConverterFactory.GraphsonJsonSerializer.Deserialize[T](JToken token) -at ExRam.Gremlinq.Support.NewtonsoftJson.NewtonsoftJsonSerializerConverterFactory.NewtonsoftJsonSerializerConverter`2.TryConvert(TSource source, ITransformer defer, ITransformer recurse, TTarget& value) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.<>c__DisplayClass8_0`3.b__1(TStaticSource staticSerialized) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.TryTransform[TSource,TTarget](TSource source, IGremlinQueryEnvironment environment, TTarget& value) -at ExRam.Gremlinq.Support.NewtonsoftJson.DeferToNewtonsoftConverterFactory.DeferToNewtonsoftConverter`1.DeferToNewtonsoftConverterImpl`1.TryConvert(TBinaryMessage source, ITransformer defer, ITransformer recurse, TTarget& value) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.<>c__DisplayClass8_0`3.b__1(TStaticSource staticSerialized) -at ExRam.Gremlinq.Core.Transformation.Transformer.TransformerImpl.TryTransform[TSource,TTarget](TSource source, IGremlinQueryEnvironment environment, TTarget& value) -at ExRam.Gremlinq.Providers.Core.WebSocketGremlinqClientFactory.WebSocketGremlinqClientFactoryImpl`1.WebSocketGremlinqClient.Channel`1.Signal(TBinaryMessage buffer, Guid requestId, ResponseStatus responseStatus) -at ExRam.Gremlinq.Providers.Core.WebSocketGremlinqClientFactory.WebSocketGremlinqClientFactoryImpl`1.WebSocketGremlinqClient.Loop(CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.WebSocketGremlinqClientFactory.WebSocketGremlinqClientFactoryImpl`1.WebSocketGremlinqClient.g__Core|13_0[T](RequestMessage message, WebSocketGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.WebSocketGremlinqClientFactory.WebSocketGremlinqClientFactoryImpl`1.WebSocketGremlinqClient.g__Core|13_0[T](RequestMessage message, WebSocketGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.WebSocketGremlinqClientFactory.WebSocketGremlinqClientFactoryImpl`1.WebSocketGremlinqClient.g__Core|13_0[T](RequestMessage message, WebSocketGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.ThrottledGremlinqClient.g__Core|4_0[T](RequestMessage message, ThrottledGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.ThrottledGremlinqClient.g__Core|4_0[T](RequestMessage message, ThrottledGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.ThrottledGremlinqClient.g__Core|4_0[T](RequestMessage message, ThrottledGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.PoolGremlinqClientFactory`1.PoolGremlinqClient.PoolSlotGremlinqClient.g__Core|3_0[T](PoolSlotGremlinqClient this, RequestMessage message, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.PoolGremlinqClientFactory`1.PoolGremlinqClient.PoolSlotGremlinqClient.g__Core|3_0[T](PoolSlotGremlinqClient this, RequestMessage message, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.PoolGremlinqClientFactory`1.PoolGremlinqClient.PoolSlotGremlinqClient.g__Core|3_0[T](PoolSlotGremlinqClient this, RequestMessage message, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.RetryGremlinqClient.g__Core|3_0[T](RetryGremlinqClient this, RequestMessage message, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.RetryGremlinqClient.g__Core|3_0[T](RetryGremlinqClient this, RequestMessage message, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.RetryGremlinqClient.g__Core|3_0[T](RetryGremlinqClient this, RequestMessage message, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.PoolGremlinqClientFactory`1.PoolGremlinqClient.g__Core|9_0[T](RequestMessage message, PoolGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.PoolGremlinqClientFactory`1.PoolGremlinqClient.g__Core|9_0[T](RequestMessage message, PoolGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.PoolGremlinqClientFactory`1.PoolGremlinqClient.g__Core|9_0[T](RequestMessage message, PoolGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.LoggingGremlinqClient.g__CatchingCore|6_1[TResult](RequestMessage requestMessage, LoggingGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.LoggingGremlinqClient.g__CatchingCore|6_1[TResult](RequestMessage requestMessage, LoggingGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.LoggingGremlinqClient.g__CatchingCore|6_1[TResult](RequestMessage requestMessage, LoggingGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.LoggingGremlinqClient.g__LoggingCore|6_0[TResult](RequestMessage requestMessage, LoggingGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.LoggingGremlinqClient.g__LoggingCore|6_0[TResult](RequestMessage requestMessage, LoggingGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientExtensions.LoggingGremlinqClient.g__LoggingCore|6_0[TResult](RequestMessage requestMessage, LoggingGremlinqClient this, CancellationToken ct) -at ExRam.Gremlinq.Core.AsyncEnumerable.g__Core|10_0[T](IAsyncEnumerable`1 source, Func`2 exceptionTransformation, CancellationToken ct) - }, - StackTrace: -at ExRam.Gremlinq.Core.AsyncEnumerable.g__Core|10_0[T](IAsyncEnumerable`1 source, Func`2 exceptionTransformation, CancellationToken ct) -at ExRam.Gremlinq.Core.AsyncEnumerable.g__Core|10_0[T](IAsyncEnumerable`1 source, Func`2 exceptionTransformation, CancellationToken ct) -at ExRam.Gremlinq.Core.AsyncEnumerable.g__Core|10_0[T](IAsyncEnumerable`1 source, Func`2 exceptionTransformation, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.GremlinQueryExecutorImpl.g__Core|3_0[T](GremlinQueryExecutorImpl this, GremlinQueryExecutionContext context, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.GremlinQueryExecutorImpl.g__Core|3_0[T](GremlinQueryExecutorImpl this, GremlinQueryExecutionContext context, CancellationToken ct) -at ExRam.Gremlinq.Providers.Core.GremlinqClientFactory.GremlinQueryExecutorImpl.g__Core|3_0[T](GremlinQueryExecutorImpl this, GremlinQueryExecutionContext context, CancellationToken ct) -at System.Collections.Generic.AsyncEnumerableHelpers.ToArrayWithLength[T](IAsyncEnumerable`1 source, CancellationToken cancellationToken) -at System.Collections.Generic.AsyncEnumerableHelpers.ToArrayWithLength[T](IAsyncEnumerable`1 source, CancellationToken cancellationToken) -at System.Collections.Generic.AsyncEnumerableHelpers.ToArray[T](IAsyncEnumerable`1 source, CancellationToken cancellationToken) -at ExRam.Gremlinq.Tests.Infrastructure.ExecutingVerifier.Verify[TElement](IGremlinQueryBase`1 query) -} \ No newline at end of file diff --git a/test/Providers.GremlinServer.Tests/IntegrationTests.cs b/test/Providers.GremlinServer.Tests/IntegrationTests.cs index ae540293d..21bfba70d 100644 --- a/test/Providers.GremlinServer.Tests/IntegrationTests.cs +++ b/test/Providers.GremlinServer.Tests/IntegrationTests.cs @@ -1,4 +1,5 @@ using ExRam.Gremlinq.Core; +using ExRam.Gremlinq.Core.Execution; using ExRam.Gremlinq.Tests.Fixtures; using ExRam.Gremlinq.Tests.Infrastructure; @@ -211,7 +212,10 @@ public Task TimeSpan_from_float() => _g public Task TimeSpan_from_malformed_string() => _g .Inject("abc") .Cast() - .Verify(); + .Awaiting(_ => _ + .FirstOrDefaultAsync()) + .Should() + .ThrowAsync(); [Fact] public async Task Deserialization_of_typed_results_is_only_called_once()