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