OpenFindDialog() public method

public OpenFindDialog ( ) : void
return void
Exemplo n.º 1
0
        public void FindCommand_DialogOpen_NotOpenedAgain()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.DialogService.ClearReceivedCalls();
                env.WordListsViewModel.FindCommand.Execute(null);
                env.DialogService.DidNotReceive().ShowModelessDialog(env.WordListsViewModel, Arg.Any <FindViewModel>(), Arg.Any <Action>());
            }
        }
Exemplo n.º 2
0
        public void FindCommand_DialogOpen_NotOpenedAgain()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.DialogService.ClearReceivedCalls();
                env.WordListsViewModel.FindCommand.Execute(null);
                env.DialogService.DidNotReceive().ShowModelessDialog(env.WordListsViewModel, Arg.Any<FindViewModel>(), Arg.Any<Action>());
            }
        }
Exemplo n.º 3
0
        public void FindCommand_GlossNothingSelectedNoMatches_NoWordSelected()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.FindViewModel.Field  = FindField.Gloss;
                env.FindViewModel.String = "gloss4";
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.Null);
            }
        }
Exemplo n.º 4
0
        public void FindCommand_GlossNothingSelectedMatches_CorrectWordsSelected()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.FindViewModel.Field  = FindField.Gloss;
                env.FindViewModel.String = "gloss2";
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[1]));
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[1]));
            }
        }
Exemplo n.º 5
0
        public void FindCommand_FormLastWordSelectedChangeSelectedWord_CorrectWordsSelected()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.FindViewModel.Field = FindField.Form;
                env.WordListsViewModel.SelectedVarietyMeaning = env.WordListsViewModel.Varieties[1].Meanings[2];
                env.FindViewModel.String = "ba";
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[2]));
                env.WordListsViewModel.SelectedVarietyMeaning = env.WordListsViewModel.Varieties[0].Meanings[0];
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[2]));
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[1].Meanings[2]));
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[1].Meanings[2]));
            }
        }
Exemplo n.º 6
0
        public void FindCommand_FormLastWordSelectedChangeSelectedWord_CorrectWordsSelected()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.FindViewModel.Field = FindField.Form;
                env.WordListsViewModel.SelectedVarietyMeaning = env.WordListsViewModel.Varieties[1].Meanings[2];
                env.FindViewModel.String = "ba";
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[2]));
                env.WordListsViewModel.SelectedVarietyMeaning = env.WordListsViewModel.Varieties[0].Meanings[0];
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[2]));
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[1].Meanings[2]));
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[1].Meanings[2]));
            }
        }
Exemplo n.º 7
0
        public void FindCommand_GlossNothingSelectedNoMatches_NoWordSelected()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.FindViewModel.Field = FindField.Gloss;
                env.FindViewModel.String = "gloss4";
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.Null);
            }
        }
Exemplo n.º 8
0
        public void FindCommand_GlossNothingSelectedMatches_CorrectWordsSelected()
        {
            using (var env = new WordListsViewModelTestEnvironment())
            {
                SetupProjectWithWords(env);
                env.OpenFindDialog();

                env.FindViewModel.Field = FindField.Gloss;
                env.FindViewModel.String = "gloss2";
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[1]));
                env.FindViewModel.FindNextCommand.Execute(null);
                Assert.That(env.WordListsViewModel.SelectedVarietyMeaning, Is.EqualTo(env.WordListsViewModel.Varieties[0].Meanings[1]));
            }
        }