public virtual void test_builder()
        {
            LegalEntityCurveGroup test = LegalEntityCurveGroup.builder().name(NAME2).repoCurves(REPO_CURVES).issuerCurves(ISSUER_CURVES).build();

            assertEquals(test.Name, NAME2);
            assertEquals(test.RepoCurves, REPO_CURVES);
            assertEquals(test.IssuerCurves, ISSUER_CURVES);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            LegalEntityCurveGroup test1 = LegalEntityCurveGroup.of(NAME1, REPO_CURVES, ISSUER_CURVES);

            coverImmutableBean(test1);
            LegalEntityCurveGroup test2 = LegalEntityCurveGroup.of(NAME1, ImmutableMap.of(), ImmutableMap.of());

            coverBeanEquals(test1, test2);
        }
Example #3
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         LegalEntityCurveGroup other = (LegalEntityCurveGroup)obj;
         return(JodaBeanUtils.equal(name, other.name) && JodaBeanUtils.equal(repoCurves, other.repoCurves) && JodaBeanUtils.equal(issuerCurves, other.issuerCurves));
     }
     return(false);
 }
        public virtual void stream()
        {
            LegalEntityCurveGroup test        = LegalEntityCurveGroup.of(NAME1, REPO_CURVES, ISSUER_CURVES);
            IList <Curve>         expectedAll = ImmutableList.builder <Curve>().add(REPO_CURVE).add(ISSUER_CURVE1).add(ISSUER_CURVE2).add(ISSUER_CURVE3).build();

            test.ToList().containsAll(expectedAll);
            IList <Curve> expectedRepo = ImmutableList.builder <Curve>().add(REPO_CURVE).build();

            test.repoCurveStream().collect(Collectors.toList()).containsAll(expectedRepo);
            IList <Curve> expectedIssuer = ImmutableList.builder <Curve>().add(ISSUER_CURVE1).add(ISSUER_CURVE2).add(ISSUER_CURVE3).build();

            test.issuerCurveStream().collect(Collectors.toList()).containsAll(expectedIssuer);
        }
        public virtual void test_of()
        {
            LegalEntityCurveGroup test = LegalEntityCurveGroup.of(NAME1, REPO_CURVES, ISSUER_CURVES);

            assertEquals(test.Name, NAME1);
            assertEquals(test.RepoCurves, REPO_CURVES);
            assertEquals(test.IssuerCurves, ISSUER_CURVES);
            assertEquals(test.findCurve(REPO_NAME).get(), REPO_CURVE);
            assertEquals(test.findCurve(ISSUER_NAME1).get(), ISSUER_CURVE1);
            assertEquals(test.findCurve(ISSUER_NAME2).get(), ISSUER_CURVE2);
            assertEquals(test.findCurve(ISSUER_NAME3).get(), ISSUER_CURVE3);
            assertFalse(test.findCurve(CurveName.of("foo")).Present);
            assertEquals(test.findRepoCurve(REPO_GROUP, GBP).get(), REPO_CURVE);
            assertEquals(test.findRepoCurve(REPO_GROUP, USD).get(), REPO_CURVE);
            assertFalse(test.findRepoCurve(REPO_GROUP, JPY).Present);
            assertEquals(test.findIssuerCurve(LEGAL_ENTITY_GROUP1, GBP).get(), ISSUER_CURVE1);
            assertEquals(test.findIssuerCurve(LEGAL_ENTITY_GROUP1, USD).get(), ISSUER_CURVE2);
            assertEquals(test.findIssuerCurve(LEGAL_ENTITY_GROUP2, GBP).get(), ISSUER_CURVE3);
            assertFalse(test.findIssuerCurve(LEGAL_ENTITY_GROUP2, USD).Present);
        }
        public virtual void test_serialization()
        {
            LegalEntityCurveGroup test = LegalEntityCurveGroup.of(NAME1, REPO_CURVES, ISSUER_CURVES);

            assertSerialization(test);
        }