本文整理匯總了TypeScript中response/form/models/responseType.ResponseType類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ResponseType類的具體用法?TypeScript ResponseType怎麽用?TypeScript ResponseType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ResponseType類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should accept interest with recognised type', () => {
ResponseType.all().forEach(type => {
const errors = validator.validateSync(new Response(type))
expect(errors.length).to.equal(0)
})
})
示例2: it
it('should return false when response is not full admission', () => {
ResponseType.except(ResponseType.FULL_ADMISSION).forEach(responseType => {
const draft: ResponseDraft = new ResponseDraft()
draft.response = new Response(responseType)
expect(draft.isResponseFullyAdmittedWithInstalments()).to.be.eq(false)
})
})
示例3: it
it('should return ResponseType for corresponding value', () => {
expect(ResponseType.valueOf(ResponseType.FULL_ADMISSION.value)).to.be.eq(ResponseType.FULL_ADMISSION)
expect(ResponseType.valueOf(ResponseType.DEFENCE.value)).to.be.eq(ResponseType.DEFENCE)
expect(ResponseType.valueOf(ResponseType.PART_ADMISSION.value)).to.be.eq(ResponseType.PART_ADMISSION)
})