Exemplo n.º 1
0
        private static void Assert(IJsonTransform transform, string source, string expected)
        {
            var transformed = JToken.Load(new JsonTextReader(new StringReader(source))
                                          .ToTokenEnumerable()
                                          .Apply(transform)
                                          .ToJsonReader());

            JToken.DeepEquals(JToken.Parse(expected), transformed).Should().BeTrue();
        }
Exemplo n.º 2
0
 private static void AssertIdentity(IJsonTransform transform, string source)
 {
     Assert(transform, source, source);
 }