00001 /* 00002 * Copyright (C) 2011 Google Inc. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 00005 * use this file except in compliance with the License. You may obtain a copy of 00006 * the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 00013 * License for the specific language governing permissions and limitations under 00014 * the License. 00015 */ 00016 00017 package org.ros; 00018 00019 import static org.junit.Assert.assertTrue; 00020 00021 import org.junit.After; 00022 import org.junit.Before; 00023 import org.junit.Ignore; 00024 import org.ros.node.DefaultNodeMainExecutor; 00025 import org.ros.node.NodeConfiguration; 00026 import org.ros.node.NodeMainExecutor; 00027 00028 import java.util.concurrent.TimeUnit; 00029 00036 @Ignore 00037 public abstract class RosTest { 00038 00039 protected RosCore rosCore; 00040 protected NodeConfiguration nodeConfiguration; 00041 protected NodeMainExecutor nodeMainExecutor; 00042 00043 @Before 00044 public void setUp() throws InterruptedException { 00045 rosCore = RosCore.newPrivate(); 00046 rosCore.start(); 00047 assertTrue(rosCore.awaitStart(1, TimeUnit.SECONDS)); 00048 nodeMainExecutor = DefaultNodeMainExecutor.newDefault(); 00049 nodeConfiguration = NodeConfiguration.newPrivate(rosCore.getUri()); 00050 } 00051 00052 @After 00053 public void tearDown() { 00054 nodeMainExecutor.shutdown(); 00055 rosCore.shutdown(); 00056 } 00057 }