public async Task Test___Method_Start___Status_Created() { var testee = new DelayActivity() { Duration = new AnyVariable <int>() { Value = 1000 } }; await testee.Start(); Assert.AreEqual(ActivityStatus.Completed, testee.Status); }
public async Task Test___Method_Stop___Status_Executing() { var testee = new DelayActivity() { Duration = new AnyVariable <int>() { Value = 10000 } }; var task = testee.Start(); Assert.AreEqual(ActivityStatus.Executing, testee.Status); Thread.Sleep(1000); testee.Stop(); await task; Assert.AreEqual(ActivityStatus.Stopped, testee.Status); }