Exemple #1
0
        public void SimpleObject()
        {
            const string expected =
                @"{
	""foo"":1
}";

            _writer.BeginObject();
            _writer.PropertyName("foo");
            _writer.Write(1);
            _writer.EndObject();
            _sw.ToString().ShouldBeEquivalentTo(expected);
        }
Exemple #2
0
        public void Object()
        {
            _writer.BeginObject();
            _writer.PropertyName("foo");
            _writer.Write(1);
            _writer.EndObject();

            _sw.ToString().ShouldBeEquivalentTo("{\"foo\":1}");
        }
Exemple #3
0
 public void Strings(string input)
 {
     _writer.Write(input);
     _sw.ToString().ShouldBeEquivalentTo(Newton.SerializeObject(input));
 }