//-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         DefaultCreditRatesScenarioMarketData other = (DefaultCreditRatesScenarioMarketData)obj;
         return(JodaBeanUtils.equal(lookup, other.lookup) && JodaBeanUtils.equal(marketData, other.marketData));
     }
     return(false);
 }
예제 #2
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            coverImmutableBean((ImmutableBean)LOOKUP_WITH_SOURCE);
            ImmutableMap <Pair <StandardId, Currency>, CurveId> ccMap = ImmutableMap.of(Pair.of(ISSUER_A, USD), CC_A_USD);
            ImmutableMap <Currency, CurveId>   dcMap = ImmutableMap.of(USD, DC_USD);
            ImmutableMap <StandardId, CurveId> rcMap = ImmutableMap.of(ISSUER_A, RC_A);
            CreditRatesMarketDataLookup        test2 = CreditRatesMarketDataLookup.of(ccMap, dcMap, rcMap);

            coverBeanEquals((ImmutableBean)LOOKUP_WITH_SOURCE, (ImmutableBean)test2);

            // related coverage
            coverImmutableBean((ImmutableBean)LOOKUP_WITH_SOURCE.marketDataView(MOCK_CALC_MARKET_DATA));
            DefaultCreditRatesScenarioMarketData.meta();
            coverImmutableBean((ImmutableBean)LOOKUP_WITH_SOURCE.marketDataView(MOCK_MARKET_DATA));
            DefaultCreditRatesMarketData.meta();
            coverImmutableBean((ImmutableBean)LOOKUP_WITH_SOURCE.marketDataView(MOCK_MARKET_DATA).creditRatesProvider());
            DefaultLookupCreditRatesProvider.meta();
        }
 //-------------------------------------------------------------------------
 public DefaultCreditRatesScenarioMarketData withMarketData(ScenarioMarketData marketData)
 {
     return(DefaultCreditRatesScenarioMarketData.of(lookup, marketData));
 }