taskx/jtulach/against-solution04/test/apifest/CurrencyTest.java
changeset 76 22885b020f15
parent 14 d907b216f8a1
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/taskx/jtulach/against-solution04/test/apifest/CurrencyTest.java	Sat Oct 11 13:30:16 2008 +0200
     1.3 @@ -0,0 +1,24 @@
     1.4 +package apifest;
     1.5 +
     1.6 +import java.math.BigDecimal;
     1.7 +import java.util.Currency;
     1.8 +import junit.framework.TestCase;
     1.9 +import org.apidesign.apifest08.currency.Convertor;
    1.10 +import org.apidesign.apifest08.currency.InvalidConversionException;
    1.11 +
    1.12 +
    1.13 +/** Write a test that works with version from task A and fails with version B.
    1.14 + */
    1.15 +public class CurrencyTest extends TestCase {
    1.16 +    public CurrencyTest(String n) {
    1.17 +        super(n);
    1.18 +    }
    1.19 +    
    1.20 +    public void testCompatibility() throws Exception {
    1.21 +        Convertor c = new Convertor() {
    1.22 +            public BigDecimal convert(Currency from, Currency to, BigDecimal amount) throws InvalidConversionException {
    1.23 +                return null;
    1.24 +            }
    1.25 +        };
    1.26 +    }
    1.27 +}