Converting from JUnit to TestNG
The TestNG Eclipse plugin has a feature that will convert your unit tests from JUnit to TestNG in a few simple clicks, and it works pretty well for the most part. However, I soon noticed that it was replacing Assert.assertX with AssertJUnit.assertX. Upon further inspection, this was because TestNG’s Assert uses different argument ordering. For example
// JUnit Assert.assertEquals(message, expected, actual); // TestNG Assert.assertEquals(actual, expected, message); Each argument has moved.
[Read More]