]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/ExistingDatabaseTest.java
Added missing org.simantics.db.{tests,testing} plug-ins.
[simantics/platform.git] / bundles / org.simantics.db.testing / src / org / simantics / db / testing / base / ExistingDatabaseTest.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.db.testing.base;
13
14 import org.junit.After;
15 import org.junit.Before;
16 import org.simantics.db.testing.common.TestBase;
17 import org.simantics.db.testing.common.Tests;
18
19 /**
20  * Base class for Simantics Test Cases. Starts ProCore at the beginning of the
21  * tests and closes it after tests are done.
22  *
23  * @author Marko Luukkainen <marko.luukkainen@vtt.fi>
24  *
25  */
26 public class ExistingDatabaseTest extends TestBase {
27
28     @Before
29     public void setUp() throws Exception {
30         state = Tests.existingDatabase();
31         super.setUp();
32     }
33     @After
34     public void tearDown() throws Exception {
35         Tests.shutdown(state);
36         state = null;
37         super.tearDown();
38     }
39     public void reconnect() throws Exception {
40         setPrintStart(false);
41         tearDown();
42         setUp();
43         setPrintStart(true);
44     }
45 }