author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 18 Oct 2008 16:51:45 +0200 | |
changeset 82 | f2a4b0e116c2 |
parent 14 | taskx/jtulach/against-solutionXY/test/apifest/CurrencyTest.java@d907b216f8a1 |
permissions | -rw-r--r-- |
jaroslav@14 | 1 |
package apifest; |
jaroslav@14 | 2 |
|
jaroslav@14 | 3 |
import junit.framework.TestCase; |
jtulach@82 | 4 |
import org.apidesign.apifest08.currency.CurrencyRate; |
jtulach@82 | 5 |
import org.apidesign.apifest08.currency.CurrencyRateFactory; |
jaroslav@14 | 6 |
|
jaroslav@14 | 7 |
|
jaroslav@14 | 8 |
/** Write a test that works with version from task A and fails with version B. |
jaroslav@14 | 9 |
*/ |
jaroslav@14 | 10 |
public class CurrencyTest extends TestCase { |
jaroslav@14 | 11 |
public CurrencyTest(String n) { |
jaroslav@14 | 12 |
super(n); |
jaroslav@14 | 13 |
} |
jaroslav@14 | 14 |
|
jaroslav@14 | 15 |
public void testCompatibility() throws Exception { |
jtulach@82 | 16 |
CurrencyRate rate = CurrencyRateFactory.getInstance().createCurrencyRate("CZK", "USD", 1, 2); |
jtulach@82 | 17 |
assertEquals("Implements one interface", 1, rate.getClass().getInterfaces().length); |
jaroslav@14 | 18 |
} |
jaroslav@14 | 19 |
} |