コード例 #1
0
        public void ShouldIgnoreNonRestfulieResults()
        {
            context.Result = new RedirectResult("some-url");
            var choosedResult = new ResultChooser().BasedOnMediaType(context, new XmlAndHypermedia(), requestInfo);

            Assert.IsTrue(choosedResult is RedirectResult);
        }
コード例 #2
0
        public void ShouldReturnViewResultIfItIsHTMLForCreated()
        {
            context.Result = new Created();
            var choosedResult = new ResultChooser().BasedOnMediaType(context, new HTML(), requestInfo);

            Assert.IsTrue(choosedResult is ViewResult);
        }
コード例 #3
0
        public void ShouldNotReturnViewResultIfItIsNotOKOrCreated()
        {
            var choosedResult = new ResultChooser().BasedOnMediaType(context, new HTML(), requestInfo);

            Assert.IsFalse(choosedResult is ViewResult);
        }