private async Task InitializeModelAsync() { #region Thinking var thinkId = System.Guid.NewGuid(); History.Events.ThinkingAboutTargetEvent.Publish(thinkId); #endregion var allTranslations = await TranslationList.GetAllAsync(); #region Thinked History.Events.ThinkedAboutTargetEvent.Publish(thinkId); #endregion ModelList = allTranslations; PopulateViewModels(allTranslations); }
public async Task GET() { Guid testId = Guid.Empty; TranslationEdit translationEdit = null; TranslationList allTranslations = null; var isAsyncComplete = false; var hasError = false; EnqueueConditional(() => isAsyncComplete); await Setup(); try { allTranslations = await TranslationList.GetAllAsync(); testId = allTranslations.First().Id; translationEdit = await TranslationEdit.GetTranslationEditAsync(testId); } catch { hasError = true; } finally { EnqueueCallback( () => Assert.IsFalse(hasError), () => Assert.IsNotNull(translationEdit), () => Assert.IsTrue(translationEdit.Phrases.Count >= 2), () => Assert.AreEqual(testId, translationEdit.Id), //KEEP THIS LAST IN THE CALLBACKS () => Teardown() ); EnqueueTestComplete(); isAsyncComplete = true; } }