示例#1
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            CurveId test = CurveId.of("Group", "Name");

            coverImmutableBean(test);
            CurveId test2 = CurveId.of("Group2", "Name2");

            coverBeanEquals(test, test2);
        }
示例#2
0
        //-------------------------------------------------------------------------
        public virtual void test_of_String()
        {
            CurveId test = CurveId.of("Group", "Name");

            assertEquals(test.CurveGroupName, CurveGroupName.of("Group"));
            assertEquals(test.CurveName, CurveName.of("Name"));
            assertEquals(test.ObservableSource, ObservableSource.NONE);
            assertEquals(test.MarketDataType, typeof(Curve));
            assertEquals(test.MarketDataName, CurveName.of("Name"));
            assertEquals(test.ToString(), "CurveId:Group/Name");
        }
示例#3
0
        public virtual void test_of_TypesSource()
        {
            CurveId test = CurveId.of(CurveGroupName.of("Group"), CurveName.of("Name"), OBS_SOURCE);

            assertEquals(test.CurveGroupName, CurveGroupName.of("Group"));
            assertEquals(test.CurveName, CurveName.of("Name"));
            assertEquals(test.ObservableSource, OBS_SOURCE);
            assertEquals(test.MarketDataType, typeof(Curve));
            assertEquals(test.MarketDataName, CurveName.of("Name"));
            assertEquals(test.ToString(), "CurveId:Group/Name/Vendor");
        }
示例#4
0
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         CurveId other = (CurveId)obj;
         return(JodaBeanUtils.equal(curveGroupName, other.curveGroupName) && JodaBeanUtils.equal(curveName, other.curveName) && JodaBeanUtils.equal(observableSource, other.observableSource));
     }
     return(false);
 }
示例#5
0
        public virtual void test_serialization()
        {
            CurveId test = CurveId.of("Group", "Name");

            assertSerialization(test);
        }