//------------------------------------------------------------------------- public virtual void test_resolve() { FxVanillaOptionTrade test = sut(); ResolvedFxVanillaOptionTrade expected = ResolvedFxVanillaOptionTrade.builder().info(TRADE_INFO).product(PRODUCT.resolve(REF_DATA)).premium(PREMIUM.resolve(REF_DATA)).build(); assertEquals(test.resolve(REF_DATA), expected); }
//------------------------------------------------------------------------- public virtual void test_builder() { ResolvedFxVanillaOptionTrade test = sut(); assertEquals(test.Info, TRADE_INFO); assertEquals(test.Product, OPTION); assertEquals(test.Premium, PREMIUM); }
public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { ResolvedFxVanillaOptionTrade other = (ResolvedFxVanillaOptionTrade)obj; return(JodaBeanUtils.equal(info, other.info) && JodaBeanUtils.equal(product, other.product) && JodaBeanUtils.equal(premium, other.premium)); } return(false); }
internal static ResolvedFxVanillaOptionTrade sut2() { return(ResolvedFxVanillaOptionTrade.builder().product(OPTION2).premium(PREMIUM2).build()); }
//------------------------------------------------------------------------- internal static ResolvedFxVanillaOptionTrade sut() { return(ResolvedFxVanillaOptionTrade.builder().info(TRADE_INFO).product(OPTION).premium(PREMIUM).build()); }