public async Task Test___Method_Reset___Status_Completed() { var to = new AnyVariable <int>() { Value = 0 }; var value = new AnyVariable <int>() { Value = 10 }; var testee = new AssignActivity() { To = to, Value = value }; await testee.Start(); Assert.AreEqual(ActivityStatus.Completed, testee.Status); Assert.AreEqual(10, to.GetValueAsObject()); testee.Reset(); Assert.AreEqual(ActivityStatus.Created, testee.Status); }
public void Test___Method_Reset___Status_Stopped() { var to = new AnyVariable <int>() { Value = 0 }; var value = new AnyVariable <int>() { Value = 10 }; var testee = new AssignActivity() { To = to, Value = value }; testee.Stop(); Assert.AreEqual(ActivityStatus.Stopped, testee.Status); Assert.AreEqual(0, to.GetValueAsObject()); testee.Reset(); Assert.AreEqual(ActivityStatus.Created, testee.Status); }