//-------------------------------------------------------------------------
        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);
        }
示例#2
0
        //-------------------------------------------------------------------------
        public virtual void test_builder()
        {
            ResolvedFxVanillaOptionTrade test = sut();

            assertEquals(test.Info, TRADE_INFO);
            assertEquals(test.Product, OPTION);
            assertEquals(test.Premium, PREMIUM);
        }
示例#3
0
 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);
 }
示例#4
0
 internal static ResolvedFxVanillaOptionTrade sut2()
 {
     return(ResolvedFxVanillaOptionTrade.builder().product(OPTION2).premium(PREMIUM2).build());
 }
示例#5
0
 //-------------------------------------------------------------------------
 internal static ResolvedFxVanillaOptionTrade sut()
 {
     return(ResolvedFxVanillaOptionTrade.builder().info(TRADE_INFO).product(OPTION).premium(PREMIUM).build());
 }