public void ShouldIgnoreNonRestfulieResults() { context.Result = new RedirectResult("some-url"); var choosedResult = new ResultChooser().BasedOnMediaType(context, new XmlAndHypermedia(), requestInfo); Assert.IsTrue(choosedResult is RedirectResult); }
public void ShouldReturnViewResultIfItIsHTMLForCreated() { context.Result = new Created(); var choosedResult = new ResultChooser().BasedOnMediaType(context, new HTML(), requestInfo); Assert.IsTrue(choosedResult is ViewResult); }
public void ShouldNotReturnViewResultIfItIsNotOKOrCreated() { var choosedResult = new ResultChooser().BasedOnMediaType(context, new HTML(), requestInfo); Assert.IsFalse(choosedResult is ViewResult); }