Ejemplo n.º 1
0
        /// <summary>
        /// Creem un càrrec en mèmoria
        /// </summary>
        public void TestBuildCharge()
        {
            Account         accountToTest         = new Account();
            BillableConcept billableConceptToTest = new BillableConcept();
            long            userIdToTest          = 789;

            Charge c = new ChargeBuilder(userIdToTest, DateTime.Now)
                       .To(accountToTest)
                       .From(billableConceptToTest)
                       .WithDate(DateTime.Now)
                       .With(new decimal(123.456))
                       .AddDescription("ChargeToTest")
                       .WithWorkFlowState(666)
                       .Build();

            Assert.IsType <Charge>(c);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// De qui i què es carrega en forma de id de Concepte Facturable.
 /// </summary>
 /// <param name="billableConcept">concepte facturable</param>
 public ChargeBuilder From(BillableConcept billableConcept)
 {
     this.billableConcept = billableConcept;
     return(this);
 }