| 1 |
/* |
| 2 |
* Copyright 2002-2004 The Apache Software Foundation. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specific language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
|
| 18 |
package test; |
| 19 |
|
| 20 |
import org.custommonkey.xmlunit.XMLTestCase; |
| 21 |
|
| 22 |
/** |
| 23 |
* base test class for Axis test cases. |
| 24 |
* @author steve loughran |
| 25 |
*/ |
| 26 |
public abstract class AxisTestBase extends XMLTestCase { |
| 27 |
|
| 28 |
public AxisTestBase(String s) { |
| 29 |
super(s); |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* probe for a property being set in ant terms. |
| 34 |
* @param propertyname |
| 35 |
* @return true if the system property is set and set to true or yes |
| 36 |
*/ |
| 37 |
public static boolean isPropertyTrue(String propertyname) { |
| 38 |
String setting = System.getProperty(propertyname); |
| 39 |
return "true".equalsIgnoreCase(setting) || |
| 40 |
"yes".equalsIgnoreCase(setting); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* test for the online tests being enabled |
| 45 |
* @return true if 'online' tests are allowed. |
| 46 |
*/ |
| 47 |
public static boolean isOnline() { |
| 48 |
return isPropertyTrue("test.functional.online"); |
| 49 |
} |
| 50 |
|
| 51 |
} |