Class MockExchangeRateProvider

java.lang.Object
org.apache.solr.schema.MockExchangeRateProvider
All Implemented Interfaces:
org.apache.solr.schema.ExchangeRateProvider

public class MockExchangeRateProvider extends Object implements org.apache.solr.schema.ExchangeRateProvider
Simple mock provider with fixed rates and some assertions
  • Constructor Details

    • MockExchangeRateProvider

      public MockExchangeRateProvider()
  • Method Details

    • getExchangeRate

      public double getExchangeRate(String sourceCurrencyCode, String targetCurrencyCode)
      Specified by:
      getExchangeRate in interface org.apache.solr.schema.ExchangeRateProvider
    • listAvailableCurrencies

      public Set<String> listAvailableCurrencies()
      Specified by:
      listAvailableCurrencies in interface org.apache.solr.schema.ExchangeRateProvider
    • reload

      public boolean reload() throws org.apache.solr.common.SolrException
      Specified by:
      reload in interface org.apache.solr.schema.ExchangeRateProvider
      Throws:
      org.apache.solr.common.SolrException
    • init

      public void init(Map<String,String> args)
      Specified by:
      init in interface org.apache.solr.schema.ExchangeRateProvider
    • inform

      public void inform(org.apache.lucene.util.ResourceLoader loader) throws org.apache.solr.common.SolrException
      Specified by:
      inform in interface org.apache.solr.schema.ExchangeRateProvider
      Throws:
      org.apache.solr.common.SolrException