jtulach@84: package apifest; jtulach@84: jtulach@84: import junit.framework.TestCase; jtulach@84: import org.apidesign.apifest08.currency.ConvertorCurrency; jtulach@84: import org.apidesign.apifest08.currency.ExchangeRate; jtulach@84: import org.apidesign.apifest08.currency.ExchangeRateProvider; jtulach@84: jtulach@84: jtulach@84: /** Write a test that works with version from task A and fails with version B. jtulach@84: */ jtulach@84: jtulach@84: public class CurrencyTest extends TestCase { jtulach@84: jtulach@84: jtulach@84: public CurrencyTest(String n) { jtulach@84: super(n); jtulach@84: } jtulach@84: jtulach@84: public void testCompatibility() throws Exception { jtulach@84: ExchangeRateProvider e = new ExchangeRateProvider(null, null, null, null) { jtulach@84: private ExchangeRate getExchangeRate(ConvertorCurrency a, ConvertorCurrency b) { //in version B it shouln't compile jtulach@84: return null; jtulach@84: } jtulach@84: }; jtulach@84: } jtulach@84: }