コード例 #1
0
        //-------------------------------------------------------------------------
        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());
 }