Example #1
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            TradeCounterpartyCalculationParameter test = TradeCounterpartyCalculationParameter.of(ImmutableMap.of(ID1, PARAM1, ID2, PARAM2), PARAM3);

            coverImmutableBean(test);
            TradeCounterpartyCalculationParameter test2 = TradeCounterpartyCalculationParameter.of(ImmutableMap.of(ID1, PARAM1), PARAM2);

            coverBeanEquals(test, test2);
        }
Example #2
0
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            TradeCounterpartyCalculationParameter test = TradeCounterpartyCalculationParameter.of(ImmutableMap.of(ID1, PARAM1, ID2, PARAM2), PARAM3);

            assertEquals(test.QueryType, typeof(TestParameter));
            assertEquals(test.Parameters.size(), 2);
            assertEquals(test.DefaultParameter, PARAM3);
            assertEquals(test.queryType(), typeof(TestParameter));
            assertEquals(test.filter(TRADE_1, TestingMeasures.PRESENT_VALUE), PARAM1);
            assertEquals(test.filter(TRADE_2, TestingMeasures.PRESENT_VALUE), PARAM2);
            assertEquals(test.filter(TRADE_3, TestingMeasures.PRESENT_VALUE), PARAM3);
        }
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         TradeCounterpartyCalculationParameter other = (TradeCounterpartyCalculationParameter)obj;
         return(JodaBeanUtils.equal(queryType_Renamed, other.queryType_Renamed) && JodaBeanUtils.equal(parameters, other.parameters) && JodaBeanUtils.equal(defaultParameter, other.defaultParameter));
     }
     return(false);
 }
Example #4
0
 public virtual void of_badType()
 {
     assertThrowsIllegalArg(() => TradeCounterpartyCalculationParameter.of(ImmutableMap.of(ID1, PARAM_OTHER), PARAM3));
 }
Example #5
0
 public virtual void of_empty()
 {
     assertThrowsIllegalArg(() => TradeCounterpartyCalculationParameter.of(ImmutableMap.of(), PARAM3));
 }