Titan Core Initial Contribution
[deliverable/titan.core.git] / titan_executor_api / TITAN_Executor_API_test / src / org / eclipse / titan / executorapi / test / TestUtil.java
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;
9
10 import static org.junit.Assert.assertTrue;
11
12 import org.eclipse.titan.executor.jni.McStateEnum;
13 import org.eclipse.titan.executorapi.JniExecutor;
14 import org.eclipse.titan.executorapi.util.Log;
15
16 /**
17 * Utility functions for JniExecutor tests
18 */
19 public class TestUtil {
20
21 /**
22 * @param aAssertedState expected MC state
23 * @throws AssertionError if current MC state is not the expected state
24 */
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 );
31 Log.fo();
32 }
33 }
This page took 0.032405 seconds and 6 git commands to generate.