//------------------------------------------------------------------------- public virtual void coverage() { ExtendedScenarioMarketData <string> test = ExtendedScenarioMarketData.of(ID1, VAL1, BASE_DATA); coverImmutableBean(test); ExtendedScenarioMarketData <string> test2 = ExtendedScenarioMarketData.of(ID2, VAL2, ImmutableScenarioMarketData.of(3, VAL_DATE, ImmutableMap.of(), ImmutableMap.of())); coverBeanEquals(test, test2); }
//----------------------------------------------------------------------- public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: ExtendedScenarioMarketData<?> other = (ExtendedScenarioMarketData<?>) obj; ExtendedScenarioMarketData <object> other = (ExtendedScenarioMarketData <object>)obj; return(JodaBeanUtils.equal(id, other.id) && JodaBeanUtils.equal(value, other.value) && JodaBeanUtils.equal(underlying, other.underlying)); } return(false); }
public virtual void of_override() { ExtendedScenarioMarketData <string> test = ExtendedScenarioMarketData.of(ID1, VAL3, BASE_DATA); assertEquals(test.Id, ID1); assertEquals(test.Value, VAL3); assertEquals(test.ValuationDate, MarketDataBox.ofSingleValue(VAL_DATE)); assertEquals(test.containsValue(ID1), true); assertEquals(test.containsValue(ID2), true); assertEquals(test.containsValue(ID3), false); assertEquals(test.getValue(ID1), VAL3); assertEquals(test.getValue(ID2), VAL2); assertThrows(() => test.getValue(ID3), typeof(MarketDataNotFoundException)); assertEquals(test.Ids, ImmutableSet.of(ID1, ID2)); assertEquals(test.findValue(ID1), VAL3); assertEquals(test.findValue(ID2), VAL2); assertEquals(test.findValue(ID3), null); assertEquals(test.getTimeSeries(ID4), TIME_SERIES); }
public virtual void serialization() { ExtendedScenarioMarketData <string> test = ExtendedScenarioMarketData.of(ID1, VAL3, BASE_DATA); assertSerialization(test); }