private Action <Action <Test.TestState> > ScheduleNotification(string creativeId, bool backgroundApp) { return((Action <Test.TestState> state) => { testDriver.StartCoroutine(TeakNotification.ScheduleNotification(creativeId, this.test.Name, 5, (TeakNotification.Reply reply) => { // if (reply.Notifications[0].ScheduleId == null) // { // errorText = "ScheduleId was null"; // } state(reply.Status == TeakNotification.Reply.ReplyStatus.Ok ? Test.TestState.Passed : Test.TestState.Failed); if (backgroundApp) { Utils.BackgroundApp(); } })); }); }