//-------------------------------------------------------------------------
        public virtual void coverage()
        {
            IndexQuoteId test = IndexQuoteId.of(GBP_SONIA);

            coverImmutableBean(test);
            IndexQuoteId test2 = IndexQuoteId.of(USD_FED_FUND, FIELD, OBS_SOURCE);

            coverBeanEquals(test, test2);
        }
        public virtual void test_of_3args()
        {
            IndexQuoteId test = IndexQuoteId.of(GBP_SONIA, FIELD, OBS_SOURCE);

            assertEquals(test.Index, GBP_SONIA);
            assertEquals(test.FieldName, FIELD);
            assertEquals(test.ObservableSource, OBS_SOURCE);
            assertEquals(test.StandardId, StandardId.of("OG-Index", GBP_SONIA.Name));
            assertEquals(test.MarketDataType, typeof(Double));
            assertEquals(test.ToString(), "IndexQuoteId:GBP-SONIA/Field/Vendor");
        }
        //-------------------------------------------------------------------------
        public virtual void test_of_1arg()
        {
            IndexQuoteId test = IndexQuoteId.of(GBP_SONIA);

            assertEquals(test.Index, GBP_SONIA);
            assertEquals(test.FieldName, FieldName.MARKET_VALUE);
            assertEquals(test.ObservableSource, ObservableSource.NONE);
            assertEquals(test.StandardId, StandardId.of("OG-Index", GBP_SONIA.Name));
            assertEquals(test.MarketDataType, typeof(Double));
            assertEquals(test.ToString(), "IndexQuoteId:GBP-SONIA/MarketValue");
        }
Exemplo n.º 4
0
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         IndexQuoteId other = (IndexQuoteId)obj;
         return(JodaBeanUtils.equal(index, other.index) && JodaBeanUtils.equal(fieldName, other.fieldName) && JodaBeanUtils.equal(observableSource, other.observableSource));
     }
     return(false);
 }
        public virtual void test_serialization()
        {
            IndexQuoteId test = IndexQuoteId.of(GBP_SONIA);

            assertSerialization(test);
        }