예제 #1
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));
 }
 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));
        }
예제 #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));
        }