//-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ImmutableMap <SecurityId, RepoGroup>               repoSecurityGroups = ImmutableMap.of(SEC_A1, GROUP_REPO_X);
            ImmutableMap <LegalEntityId, RepoGroup>            repoGroups         = ImmutableMap.of(ISSUER_A, GROUP_REPO_Y, ISSUER_B, GROUP_REPO_Y);
            ImmutableMap <Pair <RepoGroup, Currency>, CurveId> repoCurves         = ImmutableMap.of(Pair.of(GROUP_REPO_X, USD), CURVE_ID_USD1, Pair.of(GROUP_REPO_Y, USD), CURVE_ID_USD2, Pair.of(GROUP_REPO_Y, GBP), CURVE_ID_GBP1);

            ImmutableMap <LegalEntityId, LegalEntityGroup>            issuerGroups = ImmutableMap.of(ISSUER_A, GROUP_ISSUER_M, ISSUER_B, GROUP_ISSUER_N);
            ImmutableMap <Pair <LegalEntityGroup, Currency>, CurveId> issuerCurves = ImmutableMap.of(Pair.of(GROUP_ISSUER_M, USD), CURVE_ID_USD3, Pair.of(GROUP_ISSUER_N, USD), CURVE_ID_USD4, Pair.of(GROUP_ISSUER_N, GBP), CURVE_ID_GBP2);

            LegalEntityDiscountingMarketDataLookup test = LegalEntityDiscountingMarketDataLookup.of(repoSecurityGroups, repoGroups, repoCurves, issuerGroups, issuerCurves);

            coverImmutableBean((ImmutableBean)test);

            ImmutableMap <LegalEntityId, RepoGroup>                   repoGroups2   = ImmutableMap.of();
            ImmutableMap <Pair <RepoGroup, Currency>, CurveId>        repoCurves2   = ImmutableMap.of();
            ImmutableMap <LegalEntityId, LegalEntityGroup>            issuerGroups2 = ImmutableMap.of();
            ImmutableMap <Pair <LegalEntityGroup, Currency>, CurveId> issuerCurves2 = ImmutableMap.of();

            LegalEntityDiscountingMarketDataLookup test2 = LegalEntityDiscountingMarketDataLookup.of(repoGroups2, repoCurves2, issuerGroups2, issuerCurves2, OBS_SOURCE);

            coverBeanEquals((ImmutableBean)test, (ImmutableBean)test2);

            // related coverage
            coverImmutableBean((ImmutableBean)test.marketDataView(MOCK_CALC_MARKET_DATA));
            DefaultLegalEntityDiscountingScenarioMarketData.meta();

            coverImmutableBean((ImmutableBean)test.marketDataView(MOCK_MARKET_DATA));
            DefaultLegalEntityDiscountingMarketData.meta();

            coverImmutableBean((ImmutableBean)test.marketDataView(MOCK_MARKET_DATA).discountingProvider());
            DefaultLookupLegalEntityDiscountingProvider.meta();
        }
Exemple #2
0
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         DefaultLegalEntityDiscountingMarketData other = (DefaultLegalEntityDiscountingMarketData)obj;
         return(JodaBeanUtils.equal(lookup, other.lookup) && JodaBeanUtils.equal(marketData, other.marketData));
     }
     return(false);
 }
Exemple #3
0
 //-------------------------------------------------------------------------
 public LegalEntityDiscountingMarketData withMarketData(MarketData marketData)
 {
     return(DefaultLegalEntityDiscountingMarketData.of(lookup, marketData));
 }