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 java.util.Collection; 013 014/** 015 * Libraries that implement this JSR and want to be tested with this TCK must implement this 016 * interface and register it using the {@link java.util.ServiceLoader}. 017 * 018 * @author Anatole Tresch 019 */ 020public interface JSR354TestConfiguration { 021 022 /** 023 * Return a collection with all {@link javax.money.MonetaryAmount} classes that are implemented. The list 024 * must not be empty and should contain <b>every</b> amount class implemented.<p> 025 * This enables the TCK to check in addition to the basic implementation compliance, if 026 * according {@link javax.money.spi.MonetaryAmountFactoryProviderSpi} are registered/available correctly. 027 * 028 * @return a collection with all implemented amount classes, not null. 029 */ 030 Collection<Class> getAmountClasses(); 031 032 /** 033 * List a collection of {@link javax.money.CurrencyUnit} implementation.<p> 034 * This enables the TCK to check the basic implementation compliance. 035 * 036 * @return a collection with CurrencyUnit implementations to be tested. 037 */ 038 Collection<Class> getCurrencyClasses(); 039 040 041 /** 042 * This method allows to let instances of MonetaryOperator to be tested for requirements and recommendations. 043 * 044 * @return the list of operators to be checked, not null. It is allowed to return an empty list here, which will 045 * disable TCK tests for MonetaryOperator instances. 046 */ 047 Collection<javax.money.MonetaryOperator> getMonetaryOperators4Test(); 048 049}