public void EmptyObject() { var json = new JsonObject(); var actual = json.ToString(); var expected = "{ }"; HtmlAssert.AreEqual(expected, actual); }
public void EmptyWithOneAttribute() { var json = new JsonObject(); json.Add(new JsonAttribute("title", "My Object")); var actual = json.ToString(); var expected = "{ title: 'My Object' }"; HtmlAssert.AreEqual(expected, actual); }
public void EmptyWithTwoAttributes() { var json = new JsonObject(); json.Add(new JsonAttribute("title", "My Object")); json.Add(new JsonAttribute("subtitle", "This is the subtitle")); var actual = json.ToString(); var expected = @"{ title: 'My Object', subtitle: 'This is the subtitle' }"; HtmlAssert.AreEqual(expected, actual); }