//-------------------------------------------------------------------------
        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());
 }