taskx/jtulach/against-solution04/test/apifest/CurrencyTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 25 Oct 2008 20:53:00 +0200
changeset 84 2ae6e4aa7aef
parent 14 d907b216f8a1
permissions -rw-r--r--
Solutions by Petr Smid
     1 package apifest;
     2 
     3 import java.math.BigDecimal;
     4 import java.util.Currency;
     5 import junit.framework.TestCase;
     6 import org.apidesign.apifest08.currency.Convertor;
     7 import org.apidesign.apifest08.currency.InvalidConversionException;
     8 
     9 
    10 /** Write a test that works with version from task A and fails with version B.
    11  */
    12 public class CurrencyTest extends TestCase {
    13     public CurrencyTest(String n) {
    14         super(n);
    15     }
    16     
    17     public void testCompatibility() throws Exception {
    18         Convertor c = new Convertor() {
    19             public BigDecimal convert(Currency from, Currency to, BigDecimal amount) throws InvalidConversionException {
    20                 return null;
    21             }
    22         };
    23     }
    24 }