public IEnumerator Update_CallsReceiverUpdate() { IRunnerReceiver runnerReceiver = A.Fake <IRunnerReceiver>(); GameObject go = new GameObject(); ServiceManagerRunner runner = go.AddComponent <ServiceManagerRunner>(); runner.Initialize(runnerReceiver); yield return(null); A.CallTo(() => runnerReceiver.Update()).MustHaveHappenedOnceExactly(); }
public IEnumerator OnDestroy_GameObjectDestroyed_CallsReceiverOnDestroy() { IRunnerReceiver runnerReceiver = A.Fake <IRunnerReceiver>(); GameObject go = new GameObject(); ServiceManagerRunner runner = go.AddComponent <ServiceManagerRunner>(); runner.Initialize(runnerReceiver); GameObject.Destroy(go); yield return(null); A.CallTo(() => runnerReceiver.OnRunnerDestroyed()).MustHaveHappenedOnceExactly(); }