Tabnine Logo
CurrencyDirectory
Code IndexAdd Tabnine to your IDE (free)

How to use
CurrencyDirectory
in
org.jdtaus.banking

Best Java code snippets using org.jdtaus.banking.CurrencyDirectory (Showing top 5 results out of 315)

origin: org.jdtaus.banking/jdtaus-banking-it

/** Tests the {@link CurrencyDirectory#getDtausCurrencies(Date)} method to return sane values. */
public void testGetDtausCurrencies() throws Exception
{
  assert this.getCurrencyDirectory() != null;
  Assert.assertTrue( this.getCurrencyDirectory().getDtausCurrencies( new Date() ).length >= 0 );
}
origin: org.jdtaus.editor/jdtaus-editor-client-application

private void updateCurrencies()
{
  final Currency[] currencies = getCurrencyDirectory().
    getDtausCurrencies(this.date != null ? this.date : new Date());
  Arrays.sort(currencies, new Comparator()
  {
    public int compare(final Object o1, final Object o2)
    {
      assert o1 instanceof Currency;
      assert o2 instanceof Currency;
      return ((Currency) o1).getCurrencyCode().
        compareTo(((Currency) o2).getCurrencyCode());
    }
  });
  final Object prevSelection = currencyComboBox.getSelectedItem();
  currencyComboBox.removeAllItems();
  for(int i = 0; i < currencies.length; i++)
  {
    currencyComboBox.addItem(currencies[i]);
  }
  currencyComboBox.setSelectedItem(prevSelection);
}
origin: org.jdtaus.editor/jdtaus-editor-client-application

private void updateCurrencies()
{
  final Currency[] currencies = getCurrencyDirectory().
    getDtausCurrencies(this.getDate());
  Arrays.sort(currencies, new Comparator()
  {
    public int compare(final Object o1, final Object o2)
    {
      assert o1 instanceof Currency;
      assert o2 instanceof Currency;
      return ((Currency) o1).getCurrencyCode().
        compareTo(((Currency) o2).getCurrencyCode());
    }
  });
  final Object prevSelection = currencyComboBox.getSelectedItem();
  currencyComboBox.removeAllItems();
  for(int i = 0; i < currencies.length; i++)
  {
    currencyComboBox.addItem(currencies[i]);
  }
  currencyComboBox.setSelectedItem(prevSelection);
}
origin: org.jdtaus.banking/jdtaus-banking-it

/**
 * Test the {@link CurrencyDirectory#getDtausCurrencies(Date)} method to handle illegal arguments correctly by
 * throwing a {@code NullPointerException}.
 */
public void testGetDtausCurrenciesNull()
{
  assert this.getCurrencyDirectory() != null;
  try
  {
    this.getCurrencyDirectory().getDtausCurrencies( null );
    throw new AssertionError();
  }
  catch ( NullPointerException e )
  {
    Assert.assertNotNull( e.getMessage() );
    System.out.println( e.toString() );
  }
}
origin: org.jdtaus.banking/jdtaus-banking-it

/**
 * Tests the {@link CurrencyDirectory#getDtausCurrencies(Date)} method to return correct values for the EUR and DEM
 * currency for various dates.
 */
public void testCurrencyConstraints() throws Exception
{
  assert this.getCurrencyDirectory() != null;
  final Calendar cal = Calendar.getInstance();
  final Date now = cal.getTime();
  cal.set( Calendar.YEAR, 2001 );
  cal.set( Calendar.MONTH, 11 );
  cal.set( Calendar.DAY_OF_MONTH, 31 );
  final Date lastDayDEM = cal.getTime();
  cal.set( Calendar.YEAR, 2002 );
  cal.set( Calendar.MONTH, 0 );
  cal.set( Calendar.DAY_OF_MONTH, 1 );
  final Date firstDayEUR = cal.getTime();
  this.assertContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( now ), "EUR" );
  this.assertNotContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( now ), "DEM" );
  this.assertNotContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( lastDayDEM ), "EUR" );
  this.assertContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( lastDayDEM ), "DEM" );
  this.assertContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( firstDayEUR ), "EUR" );
  this.assertNotContainsCurrency( this.getCurrencyDirectory().getDtausCurrencies( firstDayEUR ), "DEM" );
}
org.jdtaus.bankingCurrencyDirectory

Javadoc

Directory holding currency information.

Example: Getting the jDTAUS Banking SPI implementation.

 
CurrencyDirectory directory = 
(CurrencyDirectory) ContainerFactory.getContainer(). 
getObject( CurrencyDirectory.class ); 

Most used methods

  • getDtausCurrencies
    Gets all DTAUS currencies known to the directory for a given date.

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JCheckBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now