Hey Atsushi, I sometimes write tests that check for part of an exception message.
For example: When the message is "Invalid value XXX for argument Z", I'd check for XXX and Z. Is that also considered a bad practice? Got a concrete example of a test where we actually assert the exception message itself? Thanks! Gert -------------------------------------------------- From: "Atsushi Eno" <[EMAIL PROTECTED]> Sent: Friday, June 13, 2008 12:35 PM To: <[email protected]>; <[EMAIL PROTECTED]> Subject: [Mono-list] Let's not compare exception messages in nunit tests > Hey guys, > > I have seen a lot of bad NUnit tests that unnecessarily compare > exception messages. They are wrong not only because they fail > in non-English Windows environment but also because those tests > will fail when Microsoft improves the messages. Furthermore, it > blocks possible message translation in the future. > They have been blocking me from checking NUnit test sanity. And > thanks to that, now we actually have a lot of wrong compatibility > assumptions in our own tests. (I don't say incompatibility is bad > but they do not have to be asserted unnecessarily.) > > Let me repeat: let's not compare any localizable strings. > > Atsushi Eno > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
