Skip to content

Package: FailedTest

FailedTest

nameinstructionbranchcomplexitylinemethod
FailedTest(String, Throwable)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
runTest()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Distribution License v. 1.0, which is available at
6: * http://www.eclipse.org/org/documents/edl-v10.php.
7: *
8: * SPDX-License-Identifier: BSD-3-Clause
9: */
10:
11: package com.sun.xml.ws.test;
12:
13: import junit.framework.TestCase;
14:
15: /**
16: * A test case that will always fail.
17: *
18: * @author Kohsuke Kawaguchi
19: */
20: class FailedTest extends TestCase {
21: private final Throwable t;
22:
23: public FailedTest(String name, Throwable t) {
24: super(name);
25: this.t = t;
26: }
27:
28: // this turns out to be a bad idea because in this way the full path name will appear as the test suite name,
29: // which messes up <junitreport> because it tries to use that as the package name.
30: // public FailedTest(File f, Throwable t) {
31: // this(f.getPath(),t);
32: // }
33:
34: protected void runTest() throws Throwable {
35: throw new Exception(t);
36: }
37: }