JUnit Testing is broken!

Hi,
I want to add JUnit tests to my adapters, but the documentation is outdated.
It is described in: http://developer.softwareag.com/tech/cai/knowhow/CISInfo_JUnitTesting.pdf

But the Params class is changed, some guessing does not help:

 System.setProperty("cis.home",	"/opt/glassfish/domains/domain1/applications/j2ee-modules/cisepoq/cis/");	   	   Params.setWebAppContextPath("/opt/glassfish/domains/domain1/applications/j2ee-modules/cisepoq/cis/"); 
CISConfig.initSingleton();

turn to:
java.lang.Error: Could not read file nullcis/config/cisconfig.xml
at com.softwareag.cis.file.FileManager.readTextFileIntoString(Unknown Source)

please help.

Thanks
Stephan

use…

  • Params.init

…instead of…

  • Params.setWebAppContextPath

Your coding looks like this:


System.setProperty("cis.home",  "/opt/glassfish/.../cisepoq/cis/");            
Params.init("/opt/glassfish/.../cisepoq/cis/",
            "/opt/glassfish/.../cislog",     // <== log dir (optional)
	         null);
CISConfig.initSingleton();

That’s what I also see within the linked PDF document (“Starting the AD Runtime”).?..

Martin