Caplin Trader 4.8.0

Class: module:caplin/fx/testing/BusinessDateServiceFixture

module:caplin/fx/testing/BusinessDateServiceFixture

Constructor

new module:caplin/fx/testing/BusinessDateServiceFixture()

Constructs a caplin.fx.testing.BusinessDateServiceFixture. The BusinessDateServiceFixture serves to interact with the mock business date provider by setting business dates on it.

Tests may use the BusinessDateServiceFixture in the following way:

  • dateProvider.tradeDate = '20110622' - will set tradeDate to 20110622 on mock business date provider
  • dateProvider.transactionDate = '20110622' - will set transactionDate to 20110622 on mock business date provider
  • dateProvider.settlementDate = '20110622' - will set settlementDate to 20110622 on mock business date provider
  • dateProvider.tenor = '1M' - will set tenor for a settlementDate to 1M on mock business date provider
  • dateProvider.businessDateIsValid = 'true' - will set isValidBusinessDay to true on mock business date provider
dateProvider.isValidBusinessDay is deprecated, use dateProvider.businessDateIsValid instead.
Implements:

Methods

setBusinessDateServiceStub(oBusinessDateServiceStub)

Parameters:
Name Type Description
oBusinessDateServiceStub module:caplin/fx/testing/BusinessDateServiceStub the mock business date provider which provides simulated business dates. Required.