public void SimpleObject() { const string expected = @"{ ""foo"":1 }"; _writer.BeginObject(); _writer.PropertyName("foo"); _writer.Write(1); _writer.EndObject(); _sw.ToString().ShouldBeEquivalentTo(expected); }
public void Object() { _writer.BeginObject(); _writer.PropertyName("foo"); _writer.Write(1); _writer.EndObject(); _sw.ToString().ShouldBeEquivalentTo("{\"foo\":1}"); }
public void Strings(string input) { _writer.Write(input); _sw.ToString().ShouldBeEquivalentTo(Newton.SerializeObject(input)); }