/
JAXWSSigTest.java
133 lines (111 loc) · 4.42 KB
/
JAXWSSigTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
* Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
/*
* $Id$
*/
package com.sun.ts.tests.signaturetest.jaxws;
import java.io.PrintWriter;
import java.util.Properties;
import com.sun.javatest.Status;
import com.sun.ts.tests.signaturetest.SigTestEE;
import com.sun.ts.tests.signaturetest.SignatureTestDriver;
import com.sun.ts.tests.signaturetest.SignatureTestDriverFactory;
/*
* This class is a simple example of a signature test that extends the
* SigTest framework class. This signature test is run outside of the
* Java EE containers. This class also contains the boilerplate
* code necessary to create a signature test using the test framework.
* To see a complete TCK example see the javaee directory for the Java EE
* TCK signature test class.
*/
public class JAXWSSigTest extends SigTestEE {
private static final long serialVersionUID = -2869098797765586541L;
/***** Abstract Method Implementation *****/
/**
* Returns a list of strings where each string represents a package name. Each
* package name will have it's signature tested by the signature test
* framework.
*
* @return String[] The names of the packages whose signatures should be
* verified.
*/
protected String[] getPackages(String vehicleName) {
return new String[] { "jakarta.xml.ws", "jakarta.xml.ws.handler",
"jakarta.xml.ws.handler.soap", "jakarta.xml.ws.http", "jakarta.xml.ws.soap",
"jakarta.xml.ws.spi", "jakarta.xml.ws.spi.http",
"jakarta.xml.ws.wsaddressing", };
}
/***** Boilerplate Code *****/
/**
* Entry point for different-VM execution. It should delegate to method
* run(String[], PrintWriter, PrintWriter), and this method should not contain
* any test configuration.
*/
public static void main(String[] args) {
JAXWSSigTest theTests = new JAXWSSigTest();
Status s = theTests.run(args, new PrintWriter(System.out),
new PrintWriter(System.err));
s.exit();
}
/**
* Entry point for same-VM execution. In different-VM execution, the main
* method delegates to this method.
*/
public Status run(String args[], PrintWriter out, PrintWriter err) {
return super.run(args, out, err);
}
/*
* The following comments are specified in the base class that defines the
* signature tests. This is done so the test finders will find the right class
* to run. The implementation of these methods is inherited from the super
* class which is part of the signature test framework.
*/
// NOTE: If the API under test is not part of your testing runtime
// environment, you may use the property sigTestClasspath to specify
// where the API under test lives. This should almost never be used.
// Normally the API under test should be specified in the classpath
// of the VM running the signature tests. Use either the first
// comment or the one below it depending on which properties your
// signature tests need. Please do not use both comments.
/*
* @class.setup_props: sigTestClasspath, Location of JAXWS jar files; ts_home;
*/
public void setup(String[] args, Properties p) throws Fault {
super.setup(args, p);
}
/*
* @testName: signatureTest
*
* @assertion: A JAXWS platform must implement the required classes and APIs
* specified in the JAXWS Specification.
*
* @test_Strategy: Using reflection, gather the implementation specific
* classes and APIs. Compare these results with the expected (required)
* classes and APIs.
*
*/
/*
* Call the parent class's cleanup method.
*/
/*
* define which sig driver we will use
*/
protected SignatureTestDriver getSigTestDriver() {
driver = SignatureTestDriverFactory
.getInstance(SignatureTestDriverFactory.SIG_TEST);
return driver;
} // END getSigTestDriver
} // end class JAXWSSigTest