Пример #1
0
        public void JsonOnly_from_scratch()
        {
            var node = new InputNode(typeof(Address));

            node.JsonOnly();

            node.Readers.ShouldHaveCount(1);
            node.UsesFormatter <JsonFormatter>().ShouldBeTrue();
        }
Пример #2
0
        public void JsonOnly_with_existing_stuff()
        {
            var node = new InputNode(typeof(Address));

            node.AllowHttpFormPosts = true;
            node.UsesFormatter <XmlFormatter>();

            node.JsonOnly();

            node.Readers.ShouldHaveCount(1);
            node.UsesFormatter <JsonFormatter>().ShouldBeTrue();
        }