1 /******************************************************************************
2 * Copyright (c) 2000-2014 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
;
17 * Utility functions for JniExecutor tests
19 public class TestUtil
{
22 * @param aAssertedState expected MC state
23 * @throws AssertionError if current MC state is not the expected state
25 public static void assertState( final McStateEnum aAssertedState
) {
26 Log
.fi(aAssertedState
);
27 final JniExecutor je
= JniExecutor
.getInstance();
28 assertTrue( je
.isConnected() );
29 final McStateEnum state
= je
.getState();
30 assertTrue( state
== aAssertedState
);