|
1 | 1 | /* |
2 | | - * Copyright (c) 2012, 2013, Werner Keil, Credit Suisse (Anatole Tresch). |
3 | | - * |
4 | | - * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
5 | | - * use this file except in compliance with the License. You may obtain a copy of |
6 | | - * 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, WITHOUT |
12 | | - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
13 | | - * License for the specific language governing permissions and limitations under |
14 | | - * the License. |
15 | | - * |
16 | | - * |
17 | | - * Contributors: Anatole Tresch - initial version. |
| 2 | + * Copyright (c) 2012, 2013, Werner Keil, Credit Suisse (Anatole Tresch). Licensed under the Apache |
| 3 | + * License, Version 2.0 (the "License"); you may not use this file except in compliance with the |
| 4 | + * License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 5 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 6 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 7 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 8 | + * the License. Contributors: Anatole Tresch - initial version. |
18 | 9 | */ |
19 | 10 | package org.javamoney.tck; |
20 | 11 |
|
21 | | -import java.lang.reflect.AccessibleObject; |
22 | 12 | import java.util.Collection; |
| 13 | +import java.util.ServiceLoader; |
23 | 14 |
|
24 | | -public interface JSR354TestConfiguration { |
| 15 | +import javax.money.CurrencyUnit; |
| 16 | +import javax.money.MonetaryAmount; |
| 17 | +import javax.money.spi.MonetaryAmountFactoryProviderSpi; |
25 | 18 |
|
26 | | - Collection<Class> getExceptionClasses(); |
| 19 | +/** |
| 20 | + * Libraries that implement this JSR and want to be tested with this TCK must implement this |
| 21 | + * interface and register it using the {@link ServiceLoader}. |
| 22 | + * |
| 23 | + * @author Anatole Tresch |
| 24 | + */ |
| 25 | +public interface JSR354TestConfiguration { |
27 | 26 |
|
| 27 | + /** |
| 28 | + * Return a collection with all {@link MonetaryAmount} classes that are implemented. The list |
| 29 | + * must not be empty and should contain <b>every</b> amount class implemented.<br/> |
| 30 | + * This enables the TCK to check in addition to the basic implementation compliance, if |
| 31 | + * according {@link MonetaryAmountFactoryProviderSpi} are registered/available correctly. |
| 32 | + * |
| 33 | + * @return a collection with all implemented amount classes, not null. |
| 34 | + */ |
28 | 35 | Collection<Class> getAmountClasses(); |
29 | 36 |
|
| 37 | + /** |
| 38 | + * List a collection of {@link CurrencyUnit} implementation.<br/> |
| 39 | + * This enables the TCK to check the basic implementation compliance, |
| 40 | + * @return |
| 41 | + */ |
30 | 42 | Collection<Class> getCurrencyClasses(); |
31 | 43 |
|
32 | 44 | } |
0 commit comments