public void ShouldSetStatusCode()
        {
            result = new BadRequest
            {
                MediaType = mediaType.Object
            };

            Assert.That(result.GetDecorators().Contains(typeof(StatusCode)));
        }
        public void ShouldSetResponseText()
        {
            result = new BadRequest(new { })
                         {
                             MediaType = mediaType.Object
                         };

            Assert.That(result.Model, Is.Not.Null);
        }
Пример #3
0
        public void SetUp()
        {
            var mediaType = new Mock<IMediaType>();
            mediaType.SetupGet(mt => mt.Synonyms).Returns(new[] { "media-type" });

            result = new BadRequest
            {
                MediaType = mediaType.Object
            };
        }