Static
AlwaysStatic
ExactlyStatic
NeverStatic
OnceStatic
SequenceThe configured setup will be applied or not accordingly to the value in the sequence.
const value = 'value';
const object = new Mock<Function>()
.setup(instance => instance(1))
.play(PlayTimes.Sequence([false, true]))
.returns(value)
.object();
expect(object(1).toBe(undefined);
expect(object(1).toBe(value);
expect(object(1).toBe(undefined);
Generated using TypeDoc
This class sets rules when a configured setup should be applied to the target invocation or not.
Example