当前位置: 首页>>代码示例>>C#>>正文


C# TestEnvironment.OpenFindDialog方法代码示例

本文整理汇总了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>());
            }
        }
开发者ID:sillsdev,项目名称:cog,代码行数:12,代码来源:VarietiesViewModelTests.cs

示例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()));
            }
        }
开发者ID:sillsdev,项目名称:cog,代码行数:18,代码来源:VarietiesViewModelTests.cs

示例3: SetupFindCommandTests

 private static void SetupFindCommandTests(TestEnvironment env)
 {
     AddVarietyData(env);
     AddComparisonData(env);
     env.OpenProject();
     env.OpenFindDialog();
 }
开发者ID:rmunn,项目名称:cog,代码行数:7,代码来源:VarietyPairsViewModelTests.cs

示例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()));
            }
        }
开发者ID:sillsdev,项目名称:cog,代码行数:25,代码来源:VarietiesViewModelTests.cs

示例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);
            }
        }
开发者ID:sillsdev,项目名称:cog,代码行数:13,代码来源:VarietiesViewModelTests.cs


注:本文中的TestEnvironment.OpenFindDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。