public void ToTypedRow_RowWithSUbDocuments_5() { var json = "{data: '{a: 1, b: 2}', map: '{c: 3, d: 4}'}"; RowWithSubDocuments row = json.JSONToDynamic(); Assert.AreEqual(3, row.Map["c"]); Assert.AreEqual(4, row.Map["d"]); }
public void ToTypedRow_RowWithSUbDocuments_4() { var json = "{data: '{a: 1, b: 2}', map: {c: 3, d: 4}}"; RowWithSubDocuments row = json.JsonToDynamic(); Aver.AreObjectsEqual(3, row.Map["c"]); Aver.AreObjectsEqual(4, row.Map["d"]); }
public void ToTypedRow_RowWithSUbDocuments_1() { var json = "{data: null, map: null}"; RowWithSubDocuments row = json.JSONToDynamic(); Assert.IsNull(row.Data); Assert.IsNull(row.Map); }
public void ToTypedRow_RowWithSUbDocuments_3() { var json = "{data: '{a: 1, b: 2}', map: null}"; RowWithSubDocuments row = json.JSONToDynamic(); Assert.AreEqual(1, ((JSONDataMap)row.Data)["a"]); Assert.AreEqual(2, ((JSONDataMap)row.Data)["b"]); Assert.IsNull(row.Map); }
public void ToTypedRow_RowWithSUbDocuments_3() { var json = "{data: '{a: 1, b: 2}', map: null}"; RowWithSubDocuments row = json.JsonToDynamic(); Aver.AreObjectsEqual(1, ((JsonDataMap)row.Data)["a"]); Aver.AreObjectsEqual(2, ((JsonDataMap)row.Data)["b"]); Aver.IsNull(row.Map); }