blob: 0f2c9353a7207e29570bddcfb9c5e45fe1a4224b [file] [log] [blame]
package org.eclipse.cdt.debug.edc.tests;
import java.util.HashMap;
import java.util.Map;
import junit.framework.Assert;
import org.eclipse.cdt.debug.edc.internal.scripting.LaunchConfiguration;
import org.eclipse.cdt.debug.edc.internal.scripting.Launcher;
import org.eclipse.core.runtime.CoreException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
@SuppressWarnings("restriction")
public class ScriptedLaunching {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
@Test
public void testLaunchConfigurations() throws CoreException {
Map<String, Object>[] configurations = Launcher.getConfigurations();
int numConfigs = configurations.length;
Map<String, Object> properties = new HashMap<String, Object>();
Map<String, Object> config = Launcher.createLaunchConfiguration("org.eclipse.cdt.debug.edc.snapshot", "TestSnap", properties);
configurations = Launcher.getConfigurations();
Assert.assertEquals(numConfigs + 1, configurations.length);
LaunchConfiguration.getIdentifier(config);
String configName = LaunchConfiguration.getName(config);
LaunchConfiguration.getType(config);
LaunchConfiguration.launch(configName);
}
}