コード例 #1
0
        /// <summary>
        /// The save.
        /// </summary>
        /// <param name="cancelledOrder">
        /// The cancelled order.
        /// </param>
        public async Task SaveAsync(ICancelledOrderJudgement cancelledOrder)
        {
            if (cancelledOrder == null)
            {
                this.logger?.LogError("Cancelled Order Judgement was null");
            }

            await Task.CompletedTask;
        }
コード例 #2
0
        /// <summary>
        /// The judgement for a cancelled order - auto save as alert.
        /// </summary>
        /// <param name="cancelledOrder">
        /// The cancelled order.
        /// </param>
        public async Task Judgement(ICancelledOrderJudgement cancelledOrder)
        {
            if (cancelledOrder == null)
            {
                this.logger?.LogError("Cancelled Order Judgement was null");
                return;
            }

            await this.judgementRepository.SaveAsync(cancelledOrder);

            // judgement is also a rule breach
            var projectedBreach = (ICancelledOrderRuleBreach)null;

            this.ruleViolationService.AddRuleViolation(projectedBreach);
        }
コード例 #3
0
 public void Setup()
 {
     this.judgementRepository                       = A.Fake <IJudgementRepository>();
     this.highProfitJudgementContext                = A.Fake <IHighProfitJudgementContext>();
     this.cancelledOrderJudgementContext            = A.Fake <ICancelledOrderJudgement>();
     this.highVolumeJudgementContext                = A.Fake <IHighVolumeJudgement>();
     this.layeringJudgementContext                  = A.Fake <ILayeringJudgement>();
     this.placingOrdersWithNoIntentJudgementContext = A.Fake <IPlacingOrdersWithNoIntentToExecuteJudgement>();
     this.rampingJudgementContext                   = A.Fake <IRampingJudgement>();
     this.markingTheCloseJudgementContext           = A.Fake <IMarkingTheCloseJudgement>();
     this.spoofingJudgementContext                  = A.Fake <ISpoofingJudgement>();
     this.highProfitJudgementMapper                 = A.Fake <IHighProfitJudgementMapper>();
     this.fixedIncomeProfitJudgementMapper          = A.Fake <IFixedIncomeHighProfitJudgementMapper>();
     this.fixedIncomeProfitJudgementContext         = A.Fake <IFixedIncomeHighProfitJudgementContext>();
     this.fixedIncomeHighVolumeJudgementMapper      = A.Fake <IFixedIncomeHighVolumeJudgementMapper>();
     this.fixedIncomeHighVolumeJudgementContext     = A.Fake <IFixedIncomeHighVolumeJudgementContext>();
     this.ruleViolationService                      = A.Fake <IRuleViolationService>();
     this.logger = A.Fake <ILogger <JudgementService> >();
 }