summaryrefslogtreecommitdiff
path: root/dbaccess/qa/complex/dbaccess/ApplicationController.java
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/qa/complex/dbaccess/ApplicationController.java')
-rw-r--r--dbaccess/qa/complex/dbaccess/ApplicationController.java34
1 files changed, 6 insertions, 28 deletions
diff --git a/dbaccess/qa/complex/dbaccess/ApplicationController.java b/dbaccess/qa/complex/dbaccess/ApplicationController.java
index fa7615809228..5b2dd1e0e613 100644
--- a/dbaccess/qa/complex/dbaccess/ApplicationController.java
+++ b/dbaccess/qa/complex/dbaccess/ApplicationController.java
@@ -53,7 +53,7 @@ import java.io.IOException;
/** complex test case for Base's application UI
*/
-public class ApplicationController extends complexlib.ComplexTestCase
+public class ApplicationController extends TestCase
{
private HsqlDatabase m_database;
@@ -66,22 +66,6 @@ public class ApplicationController extends complexlib.ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
- protected final XComponentContext getComponentContext()
- {
- XComponentContext context = null;
- try
- {
- final XPropertySet orbProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, getORB());
- context = (XComponentContext) UnoRuntime.queryInterface(XComponentContext.class,
- orbProps.getPropertyValue("DefaultContext"));
- }
- catch (Exception ex)
- {
- failed("could not retrieve the ComponentContext");
- }
- return context;
- }
- // --------------------------------------------------------------------------------------------------------
public String[] getTestMethodNames()
{
@@ -98,12 +82,6 @@ public class ApplicationController extends complexlib.ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
- protected final XMultiServiceFactory getORB()
- {
- return (XMultiServiceFactory) param.getMSF();
- }
-
- // --------------------------------------------------------------------------------------------------------
private void impl_closeDocument()
{
if (m_database != null)
@@ -143,15 +121,17 @@ public class ApplicationController extends complexlib.ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
- public void before() throws Exception, java.lang.Exception
+ public void before() throws java.lang.Exception
{
+ super.before();
impl_switchToDocument(null);
}
// --------------------------------------------------------------------------------------------------------
- public void after()
+ public void after() throws java.lang.Exception
{
impl_closeDocument();
+ super.after();
}
// --------------------------------------------------------------------------------------------------------
@@ -161,9 +141,7 @@ public class ApplicationController extends complexlib.ComplexTestCase
// then those changes are saved in the old document, actually
final String oldDocumentURL = m_database.getDocumentURL();
- final File documentFile = java.io.File.createTempFile(getTestObjectName(), ".odb");
- documentFile.deleteOnExit();
- final String newDocumentURL = URLHelper.getFileURLFromSystemPath(documentFile.getAbsoluteFile());
+ final String newDocumentURL = createTempFileURL();
// store the doc in a new location
final XStorable storeDoc = UnoRuntime.queryInterface( XStorable.class, m_databaseDocument );