public void ctor_string_JsonValue(string name) { var value = new Mock <JsonValue>().Object; var pair = new JsonPair(name, value); Assert.Equal(name, pair.Name); Assert.Same(value, pair.Value); }
public void ctor_string_JsonValue(string name) { var value = new Mock<JsonValue>().Object; var pair = new JsonPair(name, value); Assert.Equal(name, pair.Name); Assert.Same(value, pair.Value); }
public void op_Add_JsonPair() { var expected = new JsonPair("name", "value"); var document = new JsonObject { expected }; var actual = document.First(); Assert.Equal(expected, actual); }
public void opIndexer_int() { var expected = new JsonPair("name", "value"); var document = new JsonObject { expected }; var actual = document[0]; Assert.Equal(expected, actual); }
public void opIndexer_string() { const string name = "name"; var expected = new JsonPair(name, "value"); var document = new JsonObject { expected }; var actual = document[name]; Assert.Equal(expected, actual); }
public void op_GetEnumerator() { var expected = new JsonPair("name", "value"); IEnumerable document = new JsonObject { expected }; foreach (var actual in document) { Assert.Equal(expected, actual); } }