1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/taskx/psmid/against-solution13/test/apifest/CurrencyTest.java Sat Oct 25 20:53:00 2008 +0200
1.3 @@ -0,0 +1,26 @@
1.4 +package apifest;
1.5 +
1.6 +import junit.framework.TestCase;
1.7 +import org.apidesign.apifest08.currency.ConvertorCurrency;
1.8 +import org.apidesign.apifest08.currency.ExchangeRate;
1.9 +import org.apidesign.apifest08.currency.ExchangeRateProvider;
1.10 +
1.11 +
1.12 +/** Write a test that works with version from task A and fails with version B.
1.13 + */
1.14 +
1.15 +public class CurrencyTest extends TestCase {
1.16 +
1.17 +
1.18 + public CurrencyTest(String n) {
1.19 + super(n);
1.20 + }
1.21 +
1.22 + public void testCompatibility() throws Exception {
1.23 + ExchangeRateProvider e = new ExchangeRateProvider(null, null, null, null) {
1.24 + private ExchangeRate getExchangeRate(ConvertorCurrency a, ConvertorCurrency b) { //in version B it shouln't compile
1.25 + return null;
1.26 + }
1.27 + };
1.28 + }
1.29 +}