1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/taskx/jtulach/against-solution14/test/apifest/CurrencyTest.java Sat Oct 18 16:51:45 2008 +0200
1.3 @@ -0,0 +1,19 @@
1.4 +package apifest;
1.5 +
1.6 +import junit.framework.TestCase;
1.7 +import org.apidesign.apifest08.currency.CurrencyRate;
1.8 +import org.apidesign.apifest08.currency.CurrencyRateFactory;
1.9 +
1.10 +
1.11 +/** Write a test that works with version from task A and fails with version B.
1.12 + */
1.13 +public class CurrencyTest extends TestCase {
1.14 + public CurrencyTest(String n) {
1.15 + super(n);
1.16 + }
1.17 +
1.18 + public void testCompatibility() throws Exception {
1.19 + CurrencyRate rate = CurrencyRateFactory.getInstance().createCurrencyRate("CZK", "USD", 1, 2);
1.20 + assertEquals("Implements one interface", 1, rate.getClass().getInterfaces().length);
1.21 + }
1.22 +}