Beispiel #1
0
        public Account(IAgreement agreement, ITarrif tarrif, TimeSpan tarrifChangePeriod, TimeSpan paymentPeriod)
        {
            if (agreement == null) throw new ArgumentNullException(nameof(agreement));
            if (tarrif == null) throw new ArgumentNullException(nameof(tarrif));

            this.Agreement = agreement;
            this.Client = Agreement.Client;

            this.Statistic = new Statistic()
            {
                LastDatePayment = Agreement.AcceptedDate,
                LastChangePlan =  Agreement.AcceptedDate
            };

            this.Tarrif = tarrif;
            this.TarrifChangePeriod = tarrifChangePeriod;
            this.PaymentPeriod = paymentPeriod;
        }
Beispiel #2
0
        public Account(IAgreement agreement, ITarrif tarrif, TimeSpan tarrifChangePeriod, TimeSpan paymentPeriod)
        {
            if (agreement == null)
            {
                throw new ArgumentNullException(nameof(agreement));
            }
            if (tarrif == null)
            {
                throw new ArgumentNullException(nameof(tarrif));
            }

            this.Agreement = agreement;
            this.Client    = Agreement.Client;

            this.Statistic = new Statistic()
            {
                LastDatePayment = Agreement.AcceptedDate,
                LastChangePlan  = Agreement.AcceptedDate
            };

            this.Tarrif             = tarrif;
            this.TarrifChangePeriod = tarrifChangePeriod;
            this.PaymentPeriod      = paymentPeriod;
        }
Beispiel #3
0
 public static void StubResult <TExecutable, TResult>(this ExecutorStubAsync executorStub, IAgreement <TExecutable, TResult> agreement)
 {
     executorStub.StubResult <TExecutable>(agreement.Result());
 }
Beispiel #4
0
 public static void VerifySingleExecuted <TExecutable>(this ExecutorStubAsync executorStub, IAgreement <TExecutable> agreement)
 {
     executorStub.SingleExecuted <TExecutable>().Should().BeEquivalentTo(agreement.Executable());
 }