* </ul>
*/
protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
XInterface oObj = null;
XAutoTextContainer oContainer;
log.println( "creating a test environment" );
try {
XMultiServiceFactory myMSF = (XMultiServiceFactory)Param.getMSF();
Object oInst = myMSF.createInstance("com.sun.star.text.AutoTextContainer");
oContainer = (XAutoTextContainer) UnoRuntime.queryInterface(XAutoTextContainer.class,oInst);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
throw new StatusException("Couldn't create AutoTextContainer", e);
}
String myGroupName="myNewGroup2*1";
XAutoTextContainer xATC = (XAutoTextContainer) UnoRuntime.queryInterface(XAutoTextContainer.class, oContainer);
try {
log.println("removing element with name '" + myGroupName + "'");
xATC.removeByName(myGroupName);
} catch (com.sun.star.container.NoSuchElementException e) {
}
try {
log.println("adding element with name '" + myGroupName + "'");
xATC.insertNewByName(myGroupName);
} catch (ElementExistException ex) {
ex.printStackTrace(log);
throw new StatusException("could not insert '"+myGroupName+"' into container",ex);
} catch (com.sun.star.lang.IllegalArgumentException ex) {
ex.printStackTrace(log);