Try fast search NHibernate

08 August 2009

#TestsEx: who was born first the chicken or the egg?

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 ?

2 comments:

  1. 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.

    ReplyDelete
  2. 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.

    ReplyDelete