Example #1
0
        public void JsonToJson()
        {
            var json   = new JObject();
            var result = json.Adapt <JObject>(_config);

            result.ShouldBe(json);
        }
Example #2
0
        public void ToObject()
        {
            var json = new JObject {
                ["foo"] = "bar"
            };
            var result = json.Adapt <Mock>(_config);

            result.foo.ShouldBe("bar");
        }
Example #3
0
        public void ToString()
        {
            var json = new JObject {
                ["foo"] = "bar"
            };
            var result = json.Adapt <string>(_config);

            result.ShouldContainWithoutWhitespace(@"{""foo"":""bar""}");
        }