Tag: cws_dev300_odbmacros3 User: fs Date: 2008-07-30 20:51:29+0000 Modified: dba/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
Log: createTempFileURL File Changes: Directory: /dba/dbaccess/qa/complex/dbaccess/ ============================================= File [changed]: CRMBasedTestCase.java Url: http://dba.openoffice.org/source/browse/dba/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java?r1=1.1.6.4&r2=1.1.6.5 Delta lines: +16 -3 -------------------- --- CRMBasedTestCase.java 2008-07-30 08:48:41+0000 1.1.6.4 +++ CRMBasedTestCase.java 2008-07-30 20:51:27+0000 1.1.6.5 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: CRMBasedTestCase.java,v $ - * $Revision: 1.1.6.4 $ + * $Revision: 1.1.6.5 $ * * This file is part of OpenOffice.org. * @@ -29,13 +29,13 @@ ************************************************************************/ package complex.dbaccess; -import com.sun.star.beans.UnknownPropertyException; import com.sun.star.beans.XPropertySet; -import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sdb.XSingleSelectQueryComposer; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; +import java.io.File; +import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.logging.Level; @@ -69,6 +69,19 @@ } // -------------------------------------------------------------------------------------------------------- + /** returns the URL of a temporary file which can be used during the test. + * + * The file will be deleted when the process exits + * @return the URL of a temporary file + */ + protected final String createTempFileURL() throws IOException + { + File documentFile = java.io.File.createTempFile( getTestObjectName(), ".odb" ); + documentFile.deleteOnExit(); + return documentFile.getAbsoluteFile().toURL().toString(); + } + + // -------------------------------------------------------------------------------------------------------- protected void createTestCase() { try --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
