• Home
  • .NET
  • Unity
  • Godot
  • Design Overview
  • API Documentation
  • Changelog
  • GitHub
Show / Hide Table of Contents
  • Responsible
    • BddExtensions
    • IExternalResultSource
    • IFailureListener
    • IGlobalContextProvider
    • IOptionalTestResponder
    • ITestInstruction<T>
    • ITestOperation<T>
    • ITestResponder<T>
    • ITestScheduler
    • ITestWaitCondition<T>
    • LinqSupport
    • OptionalTestResponder
    • RepetitionLimitExceededException
    • Responsibly
    • TestFailureException
    • TestInstruction
    • TestInstructionExecutor
    • TestInstructionExecutor.StateNotificationCallback
    • TestOperationState
    • TestResponder
    • TestWaitCondition
  • Responsible.Bdd
    • IBddStep
    • Keywords
    • ScenarioBuilder
  • Responsible.Context
    • RunContext
  • Responsible.Docs
    • Inherit
  • Responsible.State
    • ITestOperationState
    • ITestOperationState<T>
    • StateStringBuilder
    • TestOperationStateTransition
    • TestOperationStatus
  • Responsible.Unity
    • TestOperationYieldInstruction<T>
    • UnhandledLogMessageException
    • UnityErrorLogInterceptor
    • UnityFailureListener
    • UnityTestInstructionExecutor
    • UnityTestScheduler
  • Responsible.Utilities
    • IMultipleTaskAwaiter<T>
    • IMultipleTaskSource<T>
    • IndentedStringBuilder<T>
    • RetryingPoller

Interface ITestScheduler

Abstraction for polling and time-based operations. All of such operations function based on registering callbacks to an instance of this interface. See also RetryingPoller for an implementation you may use for poll callbacks.

Namespace: Responsible
Assembly: Responsible.dll
Syntax
public interface ITestScheduler

Properties

FrameNow

Gets the frame count at this moment. The absolute value does not matter, as long as it is incremented periodically. Used for waiting for frames, and for providing state details for operations.

Declaration
int FrameNow { get; }
Property Value
Type Description
int

Current frame value.

TimeNow

Returns the current time. The absolute value does not matter, as long as time progresses monotonically. Used for timeouts, and for providing state details for operations.

Declaration
DateTimeOffset TimeNow { get; }
Property Value
Type Description
DateTimeOffset

The current time.

Remarks

This exists mostly so that it can be mocked in internal Responsible tests.

Methods

RegisterPollCallback(Action)

Registers a poll callback to be called at least once per frame. See RetryingPoller for the suggested default strategy. All time and frame based operations run from these callbacks.

Declaration
IDisposable RegisterPollCallback(Action action)
Parameters
Type Name Description
Action action

Action to call at least once on every frame.

Returns
Type Description
IDisposable

A disposable instance, which must unregister the callback when disposed.

In this article
Back to top Generated by DocFX