TestHelpersTestClock constructor

const TestHelpersTestClock({
  1. required DateTime created,
  2. required DateTime deletesAfter,
  3. required DateTime frozenTime,
  4. required String id,
  5. required bool livemode,
  6. String? name,
  7. required TestHelpersTestClockStatus status,
})

TestClock

A test clock enables deterministic control over objects in testmode. With a test clock, you can create objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.

Implementation

const TestHelpersTestClock({
  required this.created,
  required this.deletesAfter,
  required this.frozenTime,
  required this.id,
  required this.livemode,
  this.name,
  required this.status,
});