blob: be23ac31ba29ab168ee6fa0549f51112cc282b2e [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 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.ui.tests.api;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.tests.util.UITestCase;
import org.eclipse.ui.internal.WorkbenchPlugin;
/**
* Test to ensure that <code>WorkbenchPlugin.createExtension()</code> will only
* throw <code>CoreException</code>s if there is a problem creating the
* extension.
*
* @since 3.0
*/
public class Bug42616Test extends UITestCase {
/**
* @param testName
*/
public Bug42616Test(String testName) {
super(testName);
}
public void testErrorCondition() {
try {
WorkbenchPlugin.createExtension(null, null);
fail("createExtension with nulls succeeded");
}
catch (CoreException e) {
// ensure that exception has a root cause.
assertNotNull("Cause is null", e.getStatus().getException());
}
catch (Throwable t) {
fail("Throwable not wrapped in core exception.");
}
}
}