3 Replies Latest reply on Nov 30, 2009 12:36 PM by Adrien FERIAL

    TestNG : invoketMethod and Component.getInstance()

    Adrien FERIAL Newbie


      In a TestNG test, I have a strange behavior: why the results of the following code is not the same??

      final IDicomReader dicomReader = (IDicomReader) Component.getInstance("dicomReader");
      assert ( dicomReader.getSelectedSeries().size() > 0);                               // ----> true
      assert ((Integer) invokeMethod("#{dicomReader.getSelectedSeries().size()}") > 0);   // ----> false

      The scope of dicomReader is SESSION and it is a Stateful EJB.

      Any help would be very appreciated.