Example #1
0
        public void ShouldSetStatusCode()
        {
            result = new PreconditionFailed()
            {
                MediaType = mediaType.Object,
            };

            Assert.That(result.GetDecorators().Contains(typeof(StatusCode)));
        }
        public void SetUp()
        {
            var mediaType = new Mock <IMediaType>();

            mediaType.SetupGet(mt => mt.Synonyms).Returns(new[] { "media-type" });

            result = new PreconditionFailed
            {
                MediaType = mediaType.Object
            };
        }
Example #3
0
        public void ShouldSetResponseText()
        {
            result = new PreconditionFailed(new {});

            Assert.That(result.Model, Is.Not.Null);
        }