[Mono-dev] nunit test upgrading task force
charlie at nunit.com
Wed Jun 24 20:19:00 EDT 2009
> Thanks Charlie. It is good to know that it does not likely to
> be much more tasks to do for upgrading. On the other hand I
> was under the impression that those obsoleted ones lived in
> 2.5 - the conversion work is likely needed more.
>From the release notes...
* The following obsolete interfaces, classes and methods have been
o The IAsserter interface
o The AbstractAsserter class
o The Assertion class
o The AssertionFailureMessage class
o The old NUnit.Framework.TestCase class used for inheriting test
o The Assert.DoAssert() method
o The ExpectedExceptionAttribute(Type, string) constructor
o The ExpectedExceptionAttribute(string, string) constructor
Of these, IAsserter, AbstractAsserter, AssertionFailureMessage and
DoAssert are internal. Assertion you already know about.
If you inherit from NUnit.Framework.TestCase, then you need to convert
to use of attributes for the fixture, tests, setup and teardown.
If you use ExpectedException with an expected message as the second
argument, just replace it with the named parameter ExpectedMessage.
However, all of these will keep working in 2.4 if you miss them, so
it's "only" a future problem.
> BTW for those who join the upgrading, Zoltan has a script of
> easy lines that would do large parts of the work. (attached)
> Before posting changes, please make sure that
> - there is no tests lost in transition.
> - no regression is brought.
> Some addendum: since reviewing the changes may still become
> massive (Miguel did not want to spend our resources too much,
> and it is pretty much understandable) I might take a while to
> do it, or at worst have to discard the effort (in case
> changes look too significant to review history). Sorry if in
> such case. I hope it goes well.
> Atsushi Eno
> Charlie Poole wrote:
> > Hi,
> > What you described below, plus the later comment about adding
> > TestFixture and test, should work OK. If there are other types of
> > asserts, you'll need to translate them. I'm happy to take any
> > questions (list or direct
> > email) of the nature "What's the best way ..."
> > Also, even though I called 2.4.8 the last 2.4 release, I'd
> be glad to
> > to a 2.4.9 for Mono if there should be any problems that
> are easy to
> > fix.
> > Charlie
> > PS: If you find (using NUnit 2.4.x) that anything is marked
> > you can pretty much count that it's already gone in 2.5.
More information about the Mono-devel-list