I’m refactoring and improving #TestsEx.
For serialization assertion I found that the message was not so clear if the actual value, under test, is null.
So I wrote this new test before change framework code:
[TestMethod]
public void SerializableNullShouldThrowClearException()
{
Seri actual = null;
ActionAssert.Throws<ArgumentException>(()=> actual.Should().Be.BinarySerializable())
.Message.ToLowerInvariant().Should().Contain("can't check serialization for (null) value");
ActionAssert.Throws<ArgumentException>(() => actual.Should().Be.XmlSerializable())
.Message.ToLowerInvariant().Should().Contain("can't check serialization for (null) value");
}
So… I’m testing #TestsEx using #TestsEx assertions.
Who was born first the chicken or the egg ?
Excellent.. some fundamentalist may point out a dependency between the succces of both test. But ... for me "menefrega" and I think that "menefrega" to you.
ReplyDeleteExcellent.. some fundamentalist may point out a dependency between the succces of both test. But ... for me "menefrega" and I think that "menefrega" to you.
ReplyDelete