1 /******************************************************************************
2 * Copyright (c) 2000-2015 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
8 package org
.eclipse
.titan
.executorapi
.test
;
10 import static org
.junit
.Assert
.assertTrue
;
12 import org
.eclipse
.titan
.executor
.jni
.McStateEnum
;
13 import org
.eclipse
.titan
.executorapi
.JniExecutor
;
14 import org
.eclipse
.titan
.executorapi
.util
.Log
;
15 import org
.junit
.After
;
16 import org
.junit
.AfterClass
;
17 import org
.junit
.Before
;
18 import org
.junit
.BeforeClass
;
21 * Base class of asynchronous JniExecutor tests.
23 public abstract class JniExecutorAsyncTest
extends JniExecutorTest
{
26 * Common one-time initialization code for asynchronous JniExecutor tests.
27 * It runs only once for a test class.
30 public static void oneTimeSetUp() {
31 // one-time initialization code
33 // make sure, that session is shut down
34 final JniExecutor je
= JniExecutor
.getInstance();
36 je
.waitForCompletion();
41 * Common one-time cleanup code for asynchronous JniExecutor tests.
42 * It runs only once for a test class.
45 public static void oneTimeTearDown() {
46 // one-time cleanup code
52 * Common initialization code for asynchronous JniExecutor tests.
53 * It runs before each test method.
58 // check if session is not started
59 final JniExecutor je
= JniExecutor
.getInstance();
60 assertTrue( !je
.isConnected() );
61 final McStateEnum state
= je
.getState();
62 assertTrue( state
== McStateEnum
.MC_INACTIVE
);
67 * Common cleanup code for asynchronous JniExecutor tests.
68 * It runs before each test method.
71 public void tearDown() {
73 // make sure, that session is shut down
74 final JniExecutor je
= JniExecutor
.getInstance();
76 je
.waitForCompletion();
This page took 0.040616 seconds and 5 git commands to generate.