Class
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.

Constructor Summary

Attributes Name and Description
caplin.fx.testing.BusinessDateServiceFixture()

Constructs a caplin.fx.testing.BusinessDateServiceFixture.

Method Summary

Attributes Name and Description
void setBusinessDateServiceStub(caplin.fx.testing.BusinessDateServiceStub oBusinessDateServiceStub)

Methods implemented from class caplin.testing.Fixture:
addSubFixtures, canHandleProperty, doGiven, doThen, doWhen, setUp, tearDown

Constructor Detail

caplin.fx.testing.BusinessDateServiceFixture()

Constructs a caplin.fx.testing.BusinessDateServiceFixture.

Method Detail

void setBusinessDateServiceStub(caplin.fx.testing.BusinessDateServiceStub oBusinessDateServiceStub)

Parameters
caplin.fx.testing.BusinessDateServiceStub oBusinessDateServiceStub the mock business date provider which provides simulated business dates. Required.