author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 25 Oct 2008 20:53:00 +0200 | |
changeset 84 | 2ae6e4aa7aef |
permissions | -rw-r--r-- |
jtulach@84 | 1 |
package apifest; |
jtulach@84 | 2 |
|
jtulach@84 | 3 |
import junit.framework.TestCase; |
jtulach@84 | 4 |
import org.apidesign.apifest08.currency.ConvertorCurrency; |
jtulach@84 | 5 |
import org.apidesign.apifest08.currency.ExchangeRate; |
jtulach@84 | 6 |
import org.apidesign.apifest08.currency.ExchangeRateProvider; |
jtulach@84 | 7 |
|
jtulach@84 | 8 |
|
jtulach@84 | 9 |
/** Write a test that works with version from task A and fails with version B. |
jtulach@84 | 10 |
*/ |
jtulach@84 | 11 |
|
jtulach@84 | 12 |
public class CurrencyTest extends TestCase { |
jtulach@84 | 13 |
|
jtulach@84 | 14 |
|
jtulach@84 | 15 |
public CurrencyTest(String n) { |
jtulach@84 | 16 |
super(n); |
jtulach@84 | 17 |
} |
jtulach@84 | 18 |
|
jtulach@84 | 19 |
public void testCompatibility() throws Exception { |
jtulach@84 | 20 |
ExchangeRateProvider e = new ExchangeRateProvider(null, null, null, null) { |
jtulach@84 | 21 |
private ExchangeRate getExchangeRate(ConvertorCurrency a, ConvertorCurrency b) { //in version B it shouln't compile |
jtulach@84 | 22 |
return null; |
jtulach@84 | 23 |
} |
jtulach@84 | 24 |
}; |
jtulach@84 | 25 |
} |
jtulach@84 | 26 |
} |