Exemple #1
0
        public void ErrorAs_Null_ShouldFail()
        {
            ActionResult result         = new ConflictObjectResult(null as object);
            var          failureMessage = FailureMessageHelper.ExpectedContextTypeXButFoundNull(
                "ConflictObjectResult.Error", typeof(object));

            Action a = () => result.Should().BeConflictObjectResult().ErrorAs <object>();

            a.Should().Throw <Exception>().WithMessage(failureMessage);
        }
        public void BeConflictObjectResult_GivenConflictObject_ShouldPass()
        {
            ActionResult result = new ConflictObjectResult("foo");

            result.Should().BeConflictObjectResult();
        }