blob: f9278583557628a026a25c75469cb708ef3c2a48 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.debug.tests.core;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
import org.eclipse.jdt.internal.launching.JavaLocalApplicationLaunchConfigurationDelegate;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
/**
* Tests bootpath settings
*/
public class BootpathTests extends AbstractDebugTest {
public BootpathTests(String name) {
super(name);
}
public void testDefaultBootpath() throws Exception {
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
JavaLocalApplicationLaunchConfigurationDelegate delegate = new JavaLocalApplicationLaunchConfigurationDelegate();
String[] path = delegate.getBootpath(config);
assertNull("Default bootpath should be null", path);
}
public void testEmptyBootpath() throws Exception {
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
JavaLocalApplicationLaunchConfigurationDelegate delegate = new JavaLocalApplicationLaunchConfigurationDelegate();
String[] path = delegate.getBootpath(wc);
assertNotNull("Empty bootpath should be empty array", path);
assertEquals("bootpath should be empty", 0, path.length);
}
}