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

How to use
getDtausCurrencies
method
in
org.jdtaus.banking.CurrencyDirectory

Best Java code snippets using org.jdtaus.banking.CurrencyDirectory.getDtausCurrencies (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.bankingCurrencyDirectorygetDtausCurrencies

Javadoc

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

Popular methods of CurrencyDirectory

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • getContentResolver (Context)
    • runOnUiThread (Activity)
    • scheduleAtFixedRate (Timer)
    • InputStream (java.io)
      A readable source of bytes.Most clients will use input streams that read data from the file system (
    • String (java.lang)
    • MalformedURLException (java.net)
      This exception is thrown when a program attempts to create an URL from an incorrect specification.
    • ResultSet (java.sql)
      An interface for an object which represents a database table entry, returned as the result of the qu
    • TimeUnit (java.util.concurrent)
      A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
    • JFrame (javax.swing)
    • Top plugins for Android Studio
    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