public void StateEnterTest(int enter, int execute, int exit) { List <int> testVar = new List <int>(); // using list as stack containing info on which state was executed TestState state = new TestState(testVar, enter, execute, exit); state.Enter(); Assert.That(enter, Is.EqualTo(testVar[0])); }
private static async UniTask TestWork(TestState testState, CancellationToken ct) { await UniTask.SwitchToThreadPool(); testState.Enter(); await Task.Delay(100); testState.Exit(); }