We use MSpec for unit tests after MbUnit was previously used.
I'm used to what I can say
Assert.IsTrue(status, "Status should be true");
in MbUnit, that is, adding a message to the statement that is displayed if it fails.
I can not find the corresponding functionality in MSpec. I am testing some XML validations and, if that fails, I want to report a validation error message. So my MSpec code looks like
string message; bool isValid = ValidateXml(myXml, out message); isValid.ShouldBeTrue();
But I want to be able to add message to the test output if ShouldBeTrue() fails.
Is it possible?
Mark pim
source share