001/* 002 * Copyright (c) 2012, 2013, Werner Keil, Credit Suisse (Anatole Tresch). Licensed under the Apache 003 * License, Version 2.0 (the "License"); you may not use this file except in compliance with the 004 * License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 005 * Unless required by applicable law or agreed to in writing, software distributed under the License 006 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 007 * or implied. See the License for the specific language governing permissions and limitations under 008 * the License. Contributors: Anatole Tresch - initial version. 009 */ 010package org.javamoney.tck; 011 012import javax.money.CurrencyUnit; 013import javax.money.MonetaryAmount; 014import javax.money.MonetaryOperator; 015import javax.money.spi.MonetaryAmountFactoryProviderSpi; 016import java.util.Collection; 017import java.util.ServiceLoader; 018 019/** 020 * Libraries that implement this JSR and want to be tested with this TCK must implement this 021 * interface and register it using the {@link ServiceLoader}. 022 * 023 * @author Anatole Tresch 024 */ 025public interface JSR354TestConfiguration{ 026 027 /** 028 * Return a collection with all {@link MonetaryAmount} classes that are implemented. The list 029 * must not be empty and should contain <b>every</b> amount class implemented.<p> 030 * This enables the TCK to check in addition to the basic implementation compliance, if 031 * according {@link MonetaryAmountFactoryProviderSpi} are registered/available correctly. 032 * 033 * @return a collection with all implemented amount classes, not null. 034 */ 035 Collection<Class> getAmountClasses(); 036 037 /** 038 * List a collection of {@link CurrencyUnit} implementation.<p> 039 * This enables the TCK to check the basic implementation compliance. 040 * 041 * @return a collection with CurrencyUnit implementations to be tested. 042 */ 043 Collection<Class> getCurrencyClasses(); 044 045 046 /** 047 * This method allows to let instances of MonetaryOperator to be tested for requirements and recommendations. 048 * 049 * @return the list of operators to be checked, not null. It is allowed to return an empty list here, which will 050 * disable TCK tests for MonetaryOperator instances. 051 */ 052 Collection<MonetaryOperator> getMonetaryOperators4Test(); 053 054}