public void Select_Invokes_Projection_Function_For_Read_Value() { var reader = from words in JsonReader.Array(JsonReader.String()) select string.Join("-", from w in words select w.ToUpperInvariant()); var result = reader.Read(JsonUtil.Strictify("['foo', 'bar', 'baz']")); Assert.Equal("FOO-BAR-BAZ", result); }
public void Array_With_Valid_Input(ulong[] expected, string json) { var result = JsonReader.Array(JsonReader.UInt64()).Read(JsonUtil.Strictify(json)); Assert.Equal(expected, result); }
public void Array_With_Invalid_Input(string json) { Assert.Throws <JsonException>(() => _ = JsonReader.Array(JsonReader.UInt64()).Read(JsonUtil.Strictify(json))); }
public void Array_Moves_Reader() { TestMovesReaderPastReadValue(JsonReader.Array(JsonReader.UInt64()), "[42]"); }