示例#1
0
        public static void AssertSameJsonLdObject(JsonLdObject obj, string eventReferenceFile)
        {
            var eventJsonString = obj.ToJsonLdString();
            var eventJObject    = JObject.Parse(eventJsonString);
            var refJsonString   = TestUtils.LoadReferenceJsonFile(eventReferenceFile);
            var refJObject      = JObject.Parse(refJsonString);

            var diff = ObjectDiffPatch.GenerateDiff(refJObject, eventJObject);

            Debug.WriteLine(diff.NewValues);
            Debug.WriteLine(diff.OldValues);

            Assert.Null(diff.NewValues);
            Assert.Null(diff.OldValues);
        }
示例#2
0
        public static void AssertSameObjectJson(object obj, string eventReferenceFile)
        {
            var eventJsonString = JsonConvert.SerializeObject(obj, SerializerSettings);
            var eventJObject    = JObject.Parse(eventJsonString);
            var refJsonString   = TestUtils.LoadReferenceJsonFile(eventReferenceFile);
            var refJObject      = JObject.Parse(refJsonString);

            var diff = ObjectDiffPatch.GenerateDiff(refJObject, eventJObject);

            Debug.WriteLine(diff.NewValues);
            Debug.WriteLine(diff.OldValues);

            Assert.Null(diff.NewValues);
            Assert.Null(diff.OldValues);
        }