1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.tests
.shared
;
15 import org
.junit
.runner
.Description
;
16 import org
.junit
.runner
.notification
.Failure
;
17 import org
.junit
.runner
.notification
.RunListener
;
20 * Debugging RunListener, which will print to stdout the name of the tests being
23 * @author Alexandre Montplaisir
25 public class DebugListener
extends RunListener
{
28 public void testStarted(Description description
) {
29 System
.out
.println("Running " + getTestName(description
));
33 public void testAssumptionFailure(Failure failure
) {
34 System
.out
.println("SKIPPING TEST: " + getTestName(failure
.getDescription()));
35 System
.out
.println(failure
.getMessage());
39 * Get the className#methodName from a Description.
41 private static String
getTestName(Description description
) {
42 return description
.getClassName() + '#' + description
.getMethodName();
This page took 0.038236 seconds and 5 git commands to generate.