public virtual void test_ofMatrix_source()
        {
            FxRateLookup test       = FxRateLookup.ofMatrix(FxMatrixId.of(OBS_SOURCE));
            MarketData   marketData = ImmutableMarketData.builder(VAL_DATE).addValue(FxMatrixId.of(OBS_SOURCE), FxMatrix.of(GBP, USD, 1.5d)).build();

            assertEquals(test.fxRateProvider(marketData).fxRate(GBP, USD), 1.5d);
        }
        public virtual void test_ofRates_currency_source()
        {
            FxRateLookup test       = FxRateLookup.ofRates(EUR, OBS_SOURCE);
            MarketData   marketData = ImmutableMarketData.builder(VAL_DATE).addValue(FxRateId.of(GBP, USD, OBS_SOURCE), FxRate.of(GBP, USD, 1.5d)).build();

            assertEquals(test.fxRateProvider(marketData).fxRate(GBP, USD), 1.5d);
        }
 public virtual FxRateProvider fxRateProvider(int scenarioIndex)
 {
     return(lookup.fxRateProvider(marketData.scenario(scenarioIndex)));
 }
 public FxRateProvider fxRateProvider(MarketData marketData)
 {
     return(fxRateLookup.fxRateProvider(marketData));
 }