本文整理汇总了C#中TestEnvironment.OpenFindDialog方法的典型用法代码示例。如果您正苦于以下问题:C# TestEnvironment.OpenFindDialog方法的具体用法?C# TestEnvironment.OpenFindDialog怎么用?C# TestEnvironment.OpenFindDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestEnvironment
的用法示例。
在下文中一共展示了TestEnvironment.OpenFindDialog方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindCommand_DialogOpen_NotOpenedAgain
public void FindCommand_DialogOpen_NotOpenedAgain()
{
using (var env = new TestEnvironment())
{
SetupProjectWithWords(env);
env.OpenFindDialog();
env.DialogService.ClearReceivedCalls();
env.VarietiesViewModel.FindCommand.Execute(null);
env.DialogService.DidNotReceive().ShowModelessDialog(env.VarietiesViewModel, Arg.Any<FindViewModel>(), Arg.Any<Action>());
}
}
示例2: FindCommand_FormLastWordSelectedMatches_CorrectWordsSelected
public void FindCommand_FormLastWordSelectedMatches_CorrectWordsSelected()
{
using (var env = new TestEnvironment())
{
SetupProjectWithWords(env);
env.OpenFindDialog();
env.FindViewModel.Field = FindField.Form;
WordsViewModel wordsViewModel = env.VarietiesViewModel.SelectedVariety.Words;
WordViewModel[] wordsViewArray = wordsViewModel.WordsView.Cast<WordViewModel>().ToArray();
wordsViewModel.SelectedWords.Add(wordsViewArray[2]);
env.FindViewModel.String = "ba";
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(wordsViewModel.SelectedWords, Is.EquivalentTo(wordsViewArray[2].ToEnumerable()));
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(wordsViewModel.SelectedWords, Is.EquivalentTo(wordsViewArray[2].ToEnumerable()));
}
}
示例3: SetupFindCommandTests
private static void SetupFindCommandTests(TestEnvironment env)
{
AddVarietyData(env);
AddComparisonData(env);
env.OpenProject();
env.OpenFindDialog();
}
示例4: FindCommand_SwitchVarietyFormNothingSelectedMatches_CorrectWordsSelected
public void FindCommand_SwitchVarietyFormNothingSelectedMatches_CorrectWordsSelected()
{
using (var env = new TestEnvironment())
{
SetupProjectWithWords(env);
env.OpenFindDialog();
env.VarietiesViewModel.SelectedVariety = env.VarietiesViewModel.Varieties[1];
WordsViewModel wordsViewModel = env.VarietiesViewModel.SelectedVariety.Words;
wordsViewModel.WordsView = new ListCollectionView(wordsViewModel.Words);
WordViewModel[] wordsViewArray = wordsViewModel.WordsView.Cast<WordViewModel>().ToArray();
env.FindViewModel.Field = FindField.Form;
env.FindViewModel.String = "go";
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(wordsViewModel.SelectedWords, Is.EquivalentTo(wordsViewArray[1].ToEnumerable()));
wordsViewModel.SelectedWords.Clear();
wordsViewModel.SelectedWords.Add(wordsViewArray[0]);
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(wordsViewModel.SelectedWords, Is.EquivalentTo(wordsViewArray[1].ToEnumerable()));
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(wordsViewModel.SelectedWords, Is.EquivalentTo(wordsViewArray[2].ToEnumerable()));
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(wordsViewModel.SelectedWords, Is.EquivalentTo(wordsViewArray[2].ToEnumerable()));
}
}
示例5: FindCommand_FormNothingSelectedNoMatches_NoWordSelected
public void FindCommand_FormNothingSelectedNoMatches_NoWordSelected()
{
using (var env = new TestEnvironment())
{
SetupProjectWithWords(env);
env.OpenFindDialog();
env.FindViewModel.Field = FindField.Form;
env.FindViewModel.String = "fall";
env.FindViewModel.FindNextCommand.Execute(null);
Assert.That(env.VarietiesViewModel.SelectedVariety.Words.SelectedWords, Is.Empty);
}
}