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

            node.UseNoFormatters();

            node.FormatterUsage.ShouldEqual(FormatterUsage.none);
        }
Пример #2
0
        public void use_all_formatters_sets_the_usage_to_all()
        {
            var node = new ConnegInputNode(typeof(Address));

            node.UseNoFormatters();
            node.UseAllFormatters();

            node.FormatterUsage.ShouldEqual(FormatterUsage.all);
        }
Пример #3
0
        public void calling_no_formatters_clears_out_any_previously_selected_formatters()
        {
            var node = new ConnegInputNode(typeof(Address));

            node.UseFormatter <JsonFormatter>();

            node.UseNoFormatters();

            node.SelectedFormatterTypes.Any().ShouldBeFalse();
        }
Пример #4
0
 public void use_no_formatters_and_there_should_not_be_a_formatter_reader_at_all()
 {
     theInputNode.UseNoFormatters();
     theFormatterMediaReader.ShouldBeNull();
 }