Exemple #1
0
 /// <inheritdoc cref="CallerMember{T1, T2, T3}"/>
 /// <param name="executor">Test test instruction executor to use.</param>
 /// <param name="cancellationToken">Optional cancellation token to cancel the instruction prematurely.</param>
 public void CallerMemberWithExecutor <T>(
     T arg1,
     TestInstructionExecutor executor,
     CancellationToken cancellationToken = default,
     string memberName     = "",
     string sourceFilePath = "",
     int sourceLineNumber  = 0)
 {
 }
Exemple #2
0
 /// <inheritdoc cref="CallerMember{T1, T2, T3, T4}"/>
 /// <param name="executor">Test test instruction executor to use.</param>
 /// <param name="throwOnError">Whether or not to throw on cancellation or errors.</param>
 /// <param name="cancellationToken">Optional cancellation token to cancel the instruction prematurely.</param>
 public void YieldInstruction <T>(
     T arg1,
     TestInstructionExecutor executor,
     bool throwOnError,
     CancellationToken cancellationToken = default,
     string memberName     = "",
     string sourceFilePath = "",
     int sourceLineNumber  = 0)
 {
 }
Exemple #3
0
 public void BaseSetUp()
 {
     this.FailureListener       = this.MakeFailureListener();
     this.GlobalContextProvider = this.MakeGlobalContextProvider();
     this.Scheduler             = new MockTestScheduler();
     this.Executor = new TestInstructionExecutor(
         this.Scheduler,
         this.ExternalResultSource(),
         this.FailureListener,
         this.GlobalContextProvider);
 }
Exemple #4
0
        public void WaitForCoroutine_ThrowsWithInvalidExecutor()
        {
            var nonUnityExecutor = new TestInstructionExecutor(new MockTestScheduler());
            var instruction      = Responsibly
                                   .WaitForCoroutineMethod(this.Forever)
                                   .ExpectWithinSeconds(1)
                                   .ToYieldInstruction(nonUnityExecutor);

            Assert.IsTrue(instruction.CompletedWithError);
            StringAssert.Contains(nameof(MonoBehaviour), instruction.Error.Message);
        }
 public void SetUpUnityTest()
 {
     // Logging errors really complicates testing failures.
     // We have error logging tests separately.
     this.Executor = new UnityTestInstructionExecutor(logErrors: false);
 }