当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript courtDecision.CourtDecision类代码示例

本文整理汇总了TypeScript中common/court-calculations/courtDecision.CourtDecision的典型用法代码示例。如果您正苦于以下问题:TypeScript CourtDecision类的具体用法?TypeScript CourtDecision怎么用?TypeScript CourtDecision使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CourtDecision类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it('should return a court decision type when claimantPaymentDate is before defendantPaymentDate and before the courtGeneratedPaymentDate', () => {

      let defendantPaymentDate = moment(new Date()).add(5, 'days')
      let claimantPaymentDate = moment(new Date()).add(1, 'days')
      let courtGeneratedPaymentDate = moment(new Date()).add(2, 'days')

      expect(CourtDecision.calculateDecision(defendantPaymentDate, claimantPaymentDate, courtGeneratedPaymentDate)).to.equal(DecisionType.COURT)
    })
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:8,代码来源:courtDecision.ts

示例2: createCourtDecision

  static createCourtDecision (claim: Claim, draft: DraftClaimantResponse): DecisionType {
    if (claim.response.defendant.isBusiness()) {
      return DecisionType.NOT_APPLICABLE_IS_BUSINESS
    }

    const defendantLastPaymentDate: Moment = CourtDecisionHelper.getDefendantLastPaymentDate(claim)
    const claimantLastPaymentDate: Moment = CourtDecisionHelper.getClaimantLastPaymentDate(draft)
    const courtOfferedLastDate = CourtDecisionHelper.getCourtOfferedLastDate(claim, draft)

    return CourtDecision.calculateDecision(
      defendantLastPaymentDate,
      claimantLastPaymentDate,
      courtOfferedLastDate
    )
  }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:15,代码来源:CourtDecisionHelper.ts

示例3: expect

      expect(() => {
        let courtGeneratedPaymentDate = moment(new Date())
        let defendantPaymentDate = moment(new Date()).add(1, 'days')

        CourtDecision.calculateDecision(defendantPaymentDate, null, courtGeneratedPaymentDate)
      }).to.throw(Error, 'Input should be a moment, cannot be empty')
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:6,代码来源:courtDecision.ts


注:本文中的common/court-calculations/courtDecision.CourtDecision类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。