public void WhenAddFormattersIsCalledThenFormattersAreAdded()
 {
     var builder = HttpHostConfiguration.Create();
     var formatter = new TestMediaTypeFormatter();
     builder.AddFormatters(formatter);
     var config = (HttpHostConfiguration) builder;
     Assert.IsTrue(config.formatters.Contains(formatter));
 }
 public void WhenCreatedThenFormattersAreSet()
 {
     var formatters = new List<MediaTypeFormatter>();
     var formatter = new TestMediaTypeFormatter();
     formatters.Add(formatter);
     var factory = new DelegateOperationHandlerFactory(formatters, null, null);
     Assert.IsTrue(formatters.Contains(formatter));
 }
        public void WhenCreatedThenFormattersAreSet()
        {
            var formatters = new List <MediaTypeFormatter>();
            var formatter  = new TestMediaTypeFormatter();

            formatters.Add(formatter);
            var factory = new DelegateOperationHandlerFactory(formatters, null, null);

            Assert.IsTrue(formatters.Contains(formatter));
        }
Exemple #4
0
        public void WhenAddFormattersIsCalledThenFormattersAreAdded()
        {
            var builder   = HttpHostConfiguration.Create();
            var formatter = new TestMediaTypeFormatter();

            builder.AddFormatters(formatter);
            var config = (HttpHostConfiguration)builder;

            Assert.IsTrue(config.formatters.Contains(formatter));
        }