Skip to content

Commit d1e2d69

Browse files
committed
Fix failing test
1 parent a52eb15 commit d1e2d69

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/StreamJsonRpc.Tests/AsyncEnumerableTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ protected class Client : IClient
813813
}
814814

815815
[JsonConverter(typeof(ThrowingJsonConverter<UnserializableType>))]
816+
[System.Text.Json.Serialization.JsonConverter(typeof(ThrowingSystemTextJsonConverter<UnserializableType>))]
816817
[MessagePackFormatter(typeof(ThrowingMessagePackFormatter<UnserializableType>))]
817818
[NBMP.MessagePackConverter(typeof(ThrowingMessagePackNerdbankConverter<UnserializableType>))]
818819
protected class UnserializableType
@@ -857,4 +858,17 @@ public override void Write(ref NBMP.MessagePackWriter writer, in T? value, NBMP.
857858
throw new Exception();
858859
}
859860
}
861+
862+
protected class ThrowingSystemTextJsonConverter<T> : System.Text.Json.Serialization.JsonConverter<T>
863+
{
864+
public override T? Read(ref System.Text.Json.Utf8JsonReader reader, Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
865+
{
866+
throw new Exception();
867+
}
868+
869+
public override void Write(System.Text.Json.Utf8JsonWriter writer, T value, System.Text.Json.JsonSerializerOptions options)
870+
{
871+
throw new Exception();
872+
}
873+
}
860874
}

0 commit comments

Comments
 (0)