JsonElement.ObjectEnumerator objectEnumerator = jsonObjectElement.EnumerateObject();
+ Assert.Equal(default, objectEnumerator.Current);
+
for (int i = 1; i <= 3; i++)
{
Assert.True(objectEnumerator.MoveNext());
}
[Fact]
+ public static void TestBytesFromBase64()
+ {
+ Assert.Throws<NotSupportedException>(() => new JsonString().AsJsonElement().GetBytesFromBase64());
+ Assert.Throws<InvalidOperationException>(() => new JsonBoolean().AsJsonElement().GetBytesFromBase64());
+ }
+
+ [Fact]
public static void TestByte()
{
Assert.Equal(byte.MaxValue, new JsonNumber(byte.MaxValue).AsJsonElement().GetByte());
Assert.True(arrayEnumerator.MoveNext());
Assert.Equal(2, arrayEnumerator.Current.GetInt32());
Assert.False(arrayEnumerator.MoveNext());
+ Assert.Equal(default, arrayEnumerator.Current);
var jsonObjectFromCopy = (JsonObject)JsonNode.GetNode(jsonElementCopy);