Beispiel #1
0
 private ResolvedBulletPaymentTrade(TradeInfo info, ResolvedBulletPayment product)
 {
     JodaBeanUtils.notNull(info, "info");
     JodaBeanUtils.notNull(product, "product");
     this.info    = info;
     this.product = product;
 }
Beispiel #2
0
        public virtual void test_resolve_receive()
        {
            BulletPayment         test     = BulletPayment.builder().payReceive(PayReceive.RECEIVE).value(GBP_P1000).date(AdjustableDate.of(DATE_2015_06_30)).build();
            ResolvedBulletPayment expected = ResolvedBulletPayment.of(Payment.of(GBP_P1000, DATE_2015_06_30));

            assertEquals(test.resolve(REF_DATA), expected);
        }
        public virtual void test_builder()
        {
            ResolvedBulletPayment test = ResolvedBulletPayment.builder().payment(PAYMENT1).build();

            assertEquals(test.Payment, PAYMENT1);
            assertEquals(test.Currency, PAYMENT1.Currency);
        }
        //-------------------------------------------------------------------------
        public virtual void test_of()
        {
            ResolvedBulletPayment test = ResolvedBulletPayment.of(PAYMENT1);

            assertEquals(test.Payment, PAYMENT1);
            assertEquals(test.Currency, PAYMENT1.Currency);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            ResolvedBulletPayment test = ResolvedBulletPayment.of(PAYMENT1);

            coverImmutableBean(test);
            ResolvedBulletPayment test2 = ResolvedBulletPayment.of(PAYMENT2);

            coverBeanEquals(test, test2);
        }
Beispiel #6
0
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         ResolvedBulletPayment other = (ResolvedBulletPayment)obj;
         return(JodaBeanUtils.equal(payment, other.payment));
     }
     return(false);
 }
Beispiel #7
0
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 3237038:         // info
                    this.info_Renamed = (TradeInfo)newValue;
                    break;

                case -309474065:         // product
                    this.product_Renamed = (ResolvedBulletPayment)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Beispiel #8
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains an instance of a resolved Bullet Payment trade.
 /// </summary>
 /// <param name="info">  the trade info </param>
 /// <param name="product">  the product </param>
 /// <returns> the resolved trade </returns>
 public static ResolvedBulletPaymentTrade of(TradeInfo info, ResolvedBulletPayment product)
 {
     return(new ResolvedBulletPaymentTrade(info, product));
 }
Beispiel #9
0
 /// <summary>
 /// Sets the resolved bullet payment product.
 /// <para>
 /// The product captures the contracted financial details of the trade.
 /// </para>
 /// </summary>
 /// <param name="product">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder product(ResolvedBulletPayment product)
 {
     JodaBeanUtils.notNull(product, "product");
     this.product_Renamed = product;
     return(this);
 }
Beispiel #10
0
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(ResolvedBulletPaymentTrade beanToCopy)
 {
     this.info_Renamed    = beanToCopy.Info;
     this.product_Renamed = beanToCopy.Product;
 }
        public virtual void test_serialization()
        {
            ResolvedBulletPayment test = ResolvedBulletPayment.of(PAYMENT1);

            assertSerialization(test);
        }