I want to provide a message when assertion has failed but I can't figure out a way to do it.
[Test]
public void CreateInstanceTest()
{
SomeClass someClass = new SomeClass();
Assert.IsNotNull(someClass, "Constructor could not return an instance");
//provide failure message here
}
How do I do it in this test?
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void EmptyNameInConstructorThrowsExceptionTest()
{
SomeClass someClass = new SomeClass(null);
}