diff options
Diffstat (limited to 'org.eclipse.swtbot.junit4_x/junit4_3/org/eclipse/swtbot/swt/finder/junit/SWTBotJunit4ClassRunner.java')
-rw-r--r-- | org.eclipse.swtbot.junit4_x/junit4_3/org/eclipse/swtbot/swt/finder/junit/SWTBotJunit4ClassRunner.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/org.eclipse.swtbot.junit4_x/junit4_3/org/eclipse/swtbot/swt/finder/junit/SWTBotJunit4ClassRunner.java b/org.eclipse.swtbot.junit4_x/junit4_3/org/eclipse/swtbot/swt/finder/junit/SWTBotJunit4ClassRunner.java deleted file mode 100644 index a1966f76..00000000 --- a/org.eclipse.swtbot.junit4_x/junit4_3/org/eclipse/swtbot/swt/finder/junit/SWTBotJunit4ClassRunner.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 SWTBot Committers and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Hans Schwaebli - initial API and implementation (Bug 259787) - * Toby Weston - initial API and implementation (Bug 259787) - *******************************************************************************/ -package org.eclipse.swtbot.swt.finder.junit; - -import org.junit.internal.runners.TestClassRunner; -import org.junit.runner.notification.RunListener; -import org.junit.runner.notification.RunNotifier; - - -/** - * A runner that captures screenshots on test failures. If you wish to launch your application for your tests use - * {@link SWTBotApplicationLauncherClassRunner}. Clients are supposed to subclass this. Typical usage is: - * - * <pre> - * @RunWith(SWTBotJunit4ClassRunner.class) - * public class FooTest { - * @Test - * public void canSendEmail() { - * } - * } - * </pre> - * - * @author Hans Schwaebli (Bug 259787) - * @author Toby Weston (Bug 259787) - * @version $Id$ - * @see SWTBotApplicationLauncherClassRunner - * @noextend This class is not intended to be subclassed by clients. - * @noinstantiate This class is not intended to be instantiated by clients. - */ -public class SWTBotJunit4ClassRunner extends TestClassRunner { - - /** - * Creates a SWTBotRunner to run {@code klass} - * - * @throws Exception if the test class is malformed. - */ - public SWTBotJunit4ClassRunner(Class<?> klass) throws Exception { - super(klass); - } - - public void run(RunNotifier notifier) { - RunListener failureSpy = new ScreenshotCaptureListener(); - notifier.removeListener(failureSpy); // remove existing listeners that could be added by suite or class runners - notifier.addListener(failureSpy); - try { - super.run(notifier); - } finally { - notifier.removeListener(failureSpy); - } - } - -} |