public IEnumerator OperatorPlusShouldCreateGroupWithThreeRoutines() { var flags = new bool[3]; yield return(Routine.ByAction(() => flags[0] = true) + Routine.ByAction(() => flags[1] = true) + Routine.ByAction(() => flags[2] = true)); Assert.True(flags.All(e => e)); }
public IEnumerator ActionInBackgroundShouldCompleteTest() { var routine = Routine.ByAction(() => { int i = 1 + 1; return(i); }); routine.InBackground(); yield return(null); Assert.True(routine.IsComplete); }