예제 #1
0
        public void LeavesOneLinersAsIs(string input)
        {
            var result = new HttpStatusCodeWithBodyResult(HttpStatusCode.BadRequest, input);

            Assert.Equal((int)HttpStatusCode.BadRequest, result.StatusCode);
            Assert.Same(input, result.StatusDescription);
            Assert.Same(input, result.Body);
        }
예제 #2
0
        public void CollapsesLinesInStatusDescription(string input, string expected)
        {
            var result = new HttpStatusCodeWithBodyResult(HttpStatusCode.BadRequest, input);

            Assert.Equal((int)HttpStatusCode.BadRequest, result.StatusCode);
            Assert.Equal(expected, result.StatusDescription);
            Assert.Equal(input, result.Body);
        }