예제 #1
0
  @Test
  public void testIsoCode() {
    CodeProperties p = CodePropertiesLookup.getCodeProperties("AOA");
    System.out.println("Currency Code : " + p.getCurrencyCode());
    System.out.println("Currency Name : " + p.getCurrencyName());
    System.out.println("Fraction Digit : " + p.getFractionDigits());
    System.out.println("Symbol : " + p.getSymbol());
    System.out.println("=====================================\n");

    assertEquals("973", p.getCurrencyCode());
    assertEquals("Kwanza", p.getCurrencyName());
    assertEquals(2, p.getFractionDigits());
    assertEquals("AOA", p.getSymbol());
  }
예제 #2
0
  @Test
  public void testNumCodeTwo() {
    CodeProperties p = CodePropertiesLookup.getCodeProperties("960");
    assertEquals("960", p.getCurrencyCode());
    assertEquals("SDR (Special Drawing Right)", p.getCurrencyName());
    //		assertEquals(-1, p.getFractionDigits());
    assertEquals(0, p.getFractionDigits());
    assertEquals("XDR", p.getSymbol());

    System.out.println("Currency Code : " + p.getCurrencyCode());
    System.out.println("Currency Name : " + p.getCurrencyName());
    System.out.println("Fraction Digit : " + p.getFractionDigits());
    System.out.println("Symbol : " + p.getSymbol());
    System.out.println("=====================================\n");
  }
예제 #3
0
  @Test
  public void testNumCode() {
    CodeProperties p = CodePropertiesLookup.getCodeProperties("952");
    //		assertEquals("952", p.getCurrencyCode());
    assertEquals("9521", p.getCurrencyCode());
    assertEquals("CFA Franc BCEAO", p.getCurrencyName());
    assertEquals(0, p.getFractionDigits());
    assertEquals("XOF", p.getSymbol());

    System.out.println("Currency Code : " + p.getCurrencyCode());
    System.out.println("Currency Name : " + p.getCurrencyName());
    System.out.println("Fraction Digit : " + p.getFractionDigits());
    System.out.println("Symbol : " + p.getSymbol());
    System.out.println("=====================================\n");
  }