By have one Assert class that has a different parameter order and
another Junit like class that has changed name to AssertJUnit , the
WORST posssible decision has been made!! I recommend that you fix this
as soon as possible. One easy way would be to introduce a compability
package called JUnit that would contain a Assert class named Assert
with the JUnit parameter order!
This means that potentially hundreds of lines or more needs to be
changed in a file. I think this is a pretty big deal.
Point taken about JDK1.3 (did not know you supported 1.3).
>>am not sure i understand why this is [quote]the WORST possible
>>decision[/quote]. While migrating
>>JUnit tests to TestNG you will be required to manage the imports (so
you will >>have to remove/change
>>the junit.framework.Assert/TestCase and add the
>>com.beust.testng.AssertJUnit). This is imo not
>>different from having a com.beust.testng.junit.Assert import.
Sorry for the unecessary strong language. This is one of the
"dangerous" things about entusiastic TestNG users like me :-)
The real issue here - as I wrote I another post minutes ago - is that
people that want to migrate JUnit test will need to change each and
every reference to Assert to AssertJUnit in the code. This means A LOT
of changes in all the test code and NOT only import changes. If you
would have sticked with the JUnit compatible parameters in Assert or
called the TestNG assertion class something different this could have
been avoided.
Are we talking past each other ? It is not just one line in each Test
class that needs to be changed. It is much, much more. If I have a test
file with 1 import and 1000 Assert.assertXXX statements, I have to
change Assert to AssertJUnit in 1001 places in this single test class
(and that is just for one class/file). How can you say that this is not
a big deal ?
Ok, now I understand you better! In most of my projects
Assert.assertXXX is used rather than just assertXXX. Let's hope this is
not a widespread practice in case other users like myself switch to
TestNG (in wich case my recommendation of moving the JUnit stuff into
another package and having the JUnit compability class remain being
called Assert is the better choice).