public void TestDeSerializeFromValue( CultureInfo culture, object expected, SpannerDbType spannerDbType, string inputJson, TestType testType = TestType.Both) { if (testType == TestType.ClrToValue) { return; } WithCulture(culture, () => { string infoAddendum = $"type:{expected?.GetType().Name}, spannerType:{spannerDbType}, input:{inputJson} "; try { var wireValue = JsonParser.Default.Parse <Value>(inputJson); var targetClrType = expected?.GetType() ?? typeof(object); var actual = wireValue.ConvertToClrType(spannerDbType.ToProtobufType(), targetClrType); Assert.Equal(expected, actual); } catch (Exception e) { Assert.True(false, infoAddendum + e); throw; } }); }