1 Reply Latest reply on Jul 14, 2009 9:50 AM by Nikos Paraskevopoulos

    assert instead of assertTrue

    Wolfgang Gruber Newbie

      Hello!


      Maybe I am missing something, but why are you using the assert-keyword instead of assertTrue, assertEquals etc in Chapter 37. Testing Seam applications of the Seam documentation.


      Thanks in advance!


      Best regards
      Wolfgang Gruber

        • 1. Re: assert instead of assertTrue
          Nikos Paraskevopoulos Novice

          SEAM suggests using TestNG instead of JUnit for testing. The SEAM testing framework is built on TestNG. In TestNG you use the assert keyword in the place of the assert*() methods of JUnit.


          Usage is similar:


          assertTrue(cond)         => assert cond;
          assertTrue(message,cond) => assert cond : message;
          assertEquals(a,b)        => assert a == b OR assert a.equals(b);
          ...etc