public VarietyPairViewModel(SegmentPool segmentPool, IProjectService projectService, WordPairsViewModel.Factory wordPairsFactory, WordPairViewModel.Factory wordPairFactory, VarietyPair varietyPair, bool areVarietiesInOrder) : base(varietyPair) { _segmentPool = segmentPool; _projectService = projectService; _varietyPair = varietyPair; _areVarietiesInOrder = areVarietiesInOrder; _wordPairsFactory = wordPairsFactory; _wordPairFactory = wordPairFactory; Messenger.Default.Register <ComparisonPerformedMessage>(this, HandleComparisonPerformed); UpdateVarietyPair(); }
public VarietyPairViewModel(SegmentPool segmentPool, IProjectService projectService, WordPairsViewModel.Factory wordPairsFactory, WordPairViewModel.Factory wordPairFactory, VarietyPair varietyPair, bool areVarietiesInOrder) : base(varietyPair) { _segmentPool = segmentPool; _projectService = projectService; _varietyPair = varietyPair; _areVarietiesInOrder = areVarietiesInOrder; _wordPairsFactory = wordPairsFactory; _wordPairFactory = wordPairFactory; Messenger.Default.Register<ComparisonPerformedMessage>(this, HandleComparisonPerformed); UpdateVarietyPair(); }
public GlobalCorrespondencesViewModel(IProjectService projectService, IBusyService busyService, IDialogService dialogService, IImageExportService imageExportService, IGraphService graphService, WordPairsViewModel.Factory wordPairsFactory, WordPairViewModel.Factory wordPairFactory) : base("Global Correspondences") { _projectService = projectService; _busyService = busyService; _dialogService = dialogService; _imageExportService = imageExportService; _graphService = graphService; _wordPairFactory = wordPairFactory; _selectedVarieties = new HashSet <Variety>(); _projectService.ProjectOpened += _projectService_ProjectOpened; Messenger.Default.Register <ComparisonPerformedMessage>(this, msg => GenerateGraph()); Messenger.Default.Register <DomainModelChangedMessage>(this, msg => { if (msg.AffectsComparison) { ClearGraph(); } }); Messenger.Default.Register <PerformingComparisonMessage>(this, msg => ClearGraph()); _findCommand = new RelayCommand(Find); TaskAreas.Add(new TaskAreaCommandGroupViewModel("Syllable position", new TaskAreaCommandViewModel("Onset", new RelayCommand(() => SyllablePosition = SyllablePosition.Onset)), new TaskAreaCommandViewModel("Nucleus", new RelayCommand(() => SyllablePosition = SyllablePosition.Nucleus)), new TaskAreaCommandViewModel("Coda", new RelayCommand(() => SyllablePosition = SyllablePosition.Coda)))); _correspondenceFilter = new TaskAreaIntegerViewModel("Frequency threshold"); _correspondenceFilter.PropertyChanging += _correspondenceFilter_PropertyChanging; _correspondenceFilter.PropertyChanged += _correspondenceFilter_PropertyChanged; TaskAreas.Add(_correspondenceFilter); TaskAreas.Add(new TaskAreaItemsViewModel("Common tasks", new TaskAreaCommandViewModel("Find words", _findCommand), new TaskAreaItemsViewModel("Sort word pairs by", new TaskAreaCommandGroupViewModel( new TaskAreaCommandViewModel("Gloss", new RelayCommand(() => _observedWordPairs.UpdateSort("Meaning.Gloss", ListSortDirection.Ascending))), new TaskAreaCommandViewModel("Similarity", new RelayCommand(() => _observedWordPairs.UpdateSort("PhoneticSimilarityScore", ListSortDirection.Descending))))), new TaskAreaCommandViewModel("Select varieties", new RelayCommand(SelectVarieties)) )); TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks", new TaskAreaCommandViewModel("Export chart", new RelayCommand(ExportChart, CanExportChart)))); _observedWordPairs = wordPairsFactory(); _observedWordPairs.IncludeVarietyNamesInSelectedText = true; _observedWordPairs.UpdateSort("Meaning.Gloss", ListSortDirection.Ascending); }
public GlobalCorrespondencesViewModel(IProjectService projectService, IBusyService busyService, IDialogService dialogService, IImageExportService imageExportService, IGraphService graphService, WordPairsViewModel.Factory wordPairsFactory, WordPairViewModel.Factory wordPairFactory) : base("Global Correspondences") { _projectService = projectService; _busyService = busyService; _dialogService = dialogService; _imageExportService = imageExportService; _graphService = graphService; _wordPairFactory = wordPairFactory; _selectedVarieties = new HashSet<Variety>(); _projectService.ProjectOpened += _projectService_ProjectOpened; Messenger.Default.Register<ComparisonPerformedMessage>(this, msg => GenerateGraph()); Messenger.Default.Register<DomainModelChangedMessage>(this, msg => { if (msg.AffectsComparison) ClearGraph(); }); Messenger.Default.Register<PerformingComparisonMessage>(this, msg => ClearGraph()); _findCommand = new RelayCommand(Find); TaskAreas.Add(new TaskAreaCommandGroupViewModel("Syllable position", new TaskAreaCommandViewModel("Onset", new RelayCommand(() => SyllablePosition = SyllablePosition.Onset)), new TaskAreaCommandViewModel("Nucleus", new RelayCommand(() => SyllablePosition = SyllablePosition.Nucleus)), new TaskAreaCommandViewModel("Coda", new RelayCommand(() => SyllablePosition = SyllablePosition.Coda)))); _correspondenceFilter = new TaskAreaIntegerViewModel("Frequency threshold"); _correspondenceFilter.PropertyChanging += _correspondenceFilter_PropertyChanging; _correspondenceFilter.PropertyChanged += _correspondenceFilter_PropertyChanged; TaskAreas.Add(_correspondenceFilter); TaskAreas.Add(new TaskAreaItemsViewModel("Common tasks", new TaskAreaCommandViewModel("Find words", _findCommand), new TaskAreaItemsViewModel("Sort word pairs by", new TaskAreaCommandGroupViewModel( new TaskAreaCommandViewModel("Gloss", new RelayCommand(() => _observedWordPairs.UpdateSort("Meaning.Gloss", ListSortDirection.Ascending))), new TaskAreaCommandViewModel("Similarity", new RelayCommand(() => _observedWordPairs.UpdateSort("PhoneticSimilarityScore", ListSortDirection.Descending))))), new TaskAreaCommandViewModel("Select varieties", new RelayCommand(SelectVarieties)) )); TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks", new TaskAreaCommandViewModel("Export chart", new RelayCommand(ExportChart, CanExportChart)))); _observedWordPairs = wordPairsFactory(); _observedWordPairs.IncludeVarietyNamesInSelectedText = true; _observedWordPairs.UpdateSort("Meaning.Gloss", ListSortDirection.Ascending); }
public TestEnvironment() { DispatcherHelper.Initialize(); _segmentPool = new SegmentPool(); _projectService = Substitute.For <IProjectService>(); _dialogService = Substitute.For <IDialogService>(); var busyService = Substitute.For <IBusyService>(); var exportService = Substitute.For <IExportService>(); _analysisService = new AnalysisService(_segmentPool, _projectService, _dialogService, busyService); WordPairsViewModel.Factory wordPairsFactory = () => new WordPairsViewModel(busyService); WordPairViewModel.Factory wordPairFactory = (pair, order) => new WordPairViewModel(_projectService, _analysisService, pair, order); VarietyPairViewModel.Factory varietyPairFactory = (vp, order) => new VarietyPairViewModel(_segmentPool, _projectService, wordPairsFactory, wordPairFactory, vp, order); _varietyPairs = new VarietyPairsViewModel(_projectService, busyService, _dialogService, exportService, _analysisService, varietyPairFactory); _project = TestHelpers.GetTestProject(_segmentPool); _projectService.Project.Returns(_project); }
public void ObservedWordPairs() { DispatcherHelper.Initialize(); var segmentPool = new SegmentPool(); var projectService = Substitute.For <IProjectService>(); var dialogService = Substitute.For <IDialogService>(); var busyService = Substitute.For <IBusyService>(); var graphService = new GraphService(projectService); var imageExportService = Substitute.For <IImageExportService>(); var analysisService = new AnalysisService(_spanFactory, segmentPool, projectService, dialogService, busyService); WordPairsViewModel.Factory wordPairsFactory = () => new WordPairsViewModel(busyService); WordPairViewModel.Factory wordPairFactory = (pair, order) => new WordPairViewModel(projectService, analysisService, pair, order); var globalCorrespondences = new GlobalCorrespondencesViewModel(projectService, busyService, dialogService, imageExportService, graphService, wordPairsFactory, wordPairFactory); CogProject project = TestHelpers.GetTestProject(_spanFactory, segmentPool); project.Meanings.AddRange(new[] { new Meaning("gloss1", "cat1"), new Meaning("gloss2", "cat2"), new Meaning("gloss3", "cat3") }); project.Varieties.AddRange(new[] { new Variety("variety1"), new Variety("variety2"), new Variety("variety3") }); project.Varieties[0].Words.AddRange(new[] { new Word("hɛ.loʊ", project.Meanings[0]), new Word("gʊd", project.Meanings[1]), new Word("bæd", project.Meanings[2]) }); project.Varieties[1].Words.AddRange(new[] { new Word("hɛlp", project.Meanings[0]), new Word("gu.gəl", project.Meanings[1]), new Word("gu.fi", project.Meanings[2]) }); project.Varieties[2].Words.AddRange(new[] { new Word("wɜrd", project.Meanings[0]), new Word("kɑr", project.Meanings[1]), new Word("fʊt.bɔl", project.Meanings[2]) }); projectService.Project.Returns(project); analysisService.SegmentAll(); var varietyPairGenerator = new VarietyPairGenerator(); varietyPairGenerator.Process(project); var wordPairGenerator = new SimpleWordPairGenerator(segmentPool, project, 0.3, ComponentIdentifiers.PrimaryWordAligner); var globalCorrIdentifier = new SoundCorrespondenceIdentifier(segmentPool, project, ComponentIdentifiers.PrimaryWordAligner); foreach (VarietyPair vp in project.VarietyPairs) { wordPairGenerator.Process(vp); foreach (WordPair wp in vp.WordPairs) { wp.PredictedCognacy = true; } vp.CognateSoundCorrespondenceFrequencyDistribution = new ConditionalFrequencyDistribution <SoundContext, Ngram <Segment> >(); vp.CognateSoundCorrespondenceProbabilityDistribution = new ConditionalProbabilityDistribution <SoundContext, Ngram <Segment> >(vp.CognateSoundCorrespondenceFrequencyDistribution, (sc, fd) => new MaxLikelihoodProbabilityDistribution <Ngram <Segment> >(fd)); globalCorrIdentifier.Process(vp); } projectService.AreAllVarietiesCompared.Returns(true); projectService.ProjectOpened += Raise.Event(); var observedWordPairs = globalCorrespondences.ObservedWordPairs; observedWordPairs.WordPairsView = new ListCollectionView(observedWordPairs.WordPairs); Assert.That(observedWordPairs.WordPairsView, Is.Empty); globalCorrespondences.SelectedCorrespondence = globalCorrespondences.Graph.Edges.First(e => e.Source.StrRep == "g" && e.Target.StrRep == "k"); WordPairViewModel[] wordPairsArray = observedWordPairs.WordPairsView.Cast <WordPairViewModel>().ToArray(); Assert.That(wordPairsArray.Length, Is.EqualTo(2)); Assert.That(wordPairsArray[0].Meaning.Gloss, Is.EqualTo("gloss2")); Assert.That(wordPairsArray[0].AlignedNodes[2].IsSelected, Is.True); Assert.That(wordPairsArray[1].Meaning.Gloss, Is.EqualTo("gloss2")); Assert.That(wordPairsArray[1].AlignedNodes[0].IsSelected, Is.True); globalCorrespondences.SyllablePosition = SyllablePosition.Nucleus; globalCorrespondences.SelectedCorrespondence = globalCorrespondences.Graph.Edges.First(e => e.Source.StrRep == "ʊ" && e.Target.StrRep == "u"); wordPairsArray = observedWordPairs.WordPairsView.Cast <WordPairViewModel>().ToArray(); Assert.That(wordPairsArray.Length, Is.EqualTo(2)); Assert.That(wordPairsArray[0].Meaning.Gloss, Is.EqualTo("gloss2")); Assert.That(wordPairsArray[0].AlignedNodes[1].IsSelected, Is.True); Assert.That(wordPairsArray[1].Meaning.Gloss, Is.EqualTo("gloss3")); Assert.That(wordPairsArray[1].AlignedNodes[1].IsSelected, Is.True); globalCorrespondences.SelectedCorrespondence = null; Assert.That(observedWordPairs.WordPairsView, Is.Empty); }
public void Graph() { DispatcherHelper.Initialize(); var segmentPool = new SegmentPool(); var projectService = Substitute.For <IProjectService>(); var dialogService = Substitute.For <IDialogService>(); var busyService = Substitute.For <IBusyService>(); var graphService = new GraphService(projectService); var imageExportService = Substitute.For <IImageExportService>(); var analysisService = new AnalysisService(_spanFactory, segmentPool, projectService, dialogService, busyService); WordPairsViewModel.Factory wordPairsFactory = () => new WordPairsViewModel(busyService); WordPairViewModel.Factory wordPairFactory = (pair, order) => new WordPairViewModel(projectService, analysisService, pair, order); var globalCorrespondences = new GlobalCorrespondencesViewModel(projectService, busyService, dialogService, imageExportService, graphService, wordPairsFactory, wordPairFactory); CogProject project = TestHelpers.GetTestProject(_spanFactory, segmentPool); project.Meanings.AddRange(new[] { new Meaning("gloss1", "cat1"), new Meaning("gloss2", "cat2"), new Meaning("gloss3", "cat3") }); project.Varieties.AddRange(new[] { new Variety("variety1"), new Variety("variety2"), new Variety("variety3") }); project.Varieties[0].Words.AddRange(new[] { new Word("hɛ.loʊ", project.Meanings[0]), new Word("gʊd", project.Meanings[1]), new Word("bæd", project.Meanings[2]) }); project.Varieties[1].Words.AddRange(new[] { new Word("hɛlp", project.Meanings[0]), new Word("gu.gəl", project.Meanings[1]), new Word("gu.fi", project.Meanings[2]) }); project.Varieties[2].Words.AddRange(new[] { new Word("wɜrd", project.Meanings[0]), new Word("kɑr", project.Meanings[1]), new Word("fʊt.bɔl", project.Meanings[2]) }); projectService.Project.Returns(project); analysisService.SegmentAll(); projectService.ProjectOpened += Raise.Event(); Assert.That(globalCorrespondences.Graph, Is.Null); Messenger.Default.Send(new PerformingComparisonMessage()); var varietyPairGenerator = new VarietyPairGenerator(); varietyPairGenerator.Process(project); var wordPairGenerator = new SimpleWordPairGenerator(segmentPool, project, 0.3, ComponentIdentifiers.PrimaryWordAligner); var globalCorrIdentifier = new SoundCorrespondenceIdentifier(segmentPool, project, ComponentIdentifiers.PrimaryWordAligner); foreach (VarietyPair vp in project.VarietyPairs) { wordPairGenerator.Process(vp); foreach (WordPair wp in vp.WordPairs) { wp.PredictedCognacy = true; } vp.CognateSoundCorrespondenceFrequencyDistribution = new ConditionalFrequencyDistribution <SoundContext, Ngram <Segment> >(); vp.CognateSoundCorrespondenceProbabilityDistribution = new ConditionalProbabilityDistribution <SoundContext, Ngram <Segment> >(vp.CognateSoundCorrespondenceFrequencyDistribution, (sc, fd) => new MaxLikelihoodProbabilityDistribution <Ngram <Segment> >(fd)); globalCorrIdentifier.Process(vp); } projectService.AreAllVarietiesCompared.Returns(true); Messenger.Default.Send(new ComparisonPerformedMessage()); Assert.That(globalCorrespondences.Graph, Is.Not.Null); globalCorrespondences.SyllablePosition = SyllablePosition.Nucleus; Assert.That(globalCorrespondences.Graph, Is.Not.Null); Messenger.Default.Send(new DomainModelChangedMessage(true)); Assert.That(globalCorrespondences.Graph, Is.Null); globalCorrespondences.SyllablePosition = SyllablePosition.Coda; Assert.That(globalCorrespondences.Graph, Is.Null); }
public void FindCommand() { DispatcherHelper.Initialize(); var segmentPool = new SegmentPool(); var projectService = Substitute.For <IProjectService>(); var dialogService = Substitute.For <IDialogService>(); var busyService = Substitute.For <IBusyService>(); var graphService = new GraphService(projectService); var imageExportService = Substitute.For <IImageExportService>(); var analysisService = new AnalysisService(_spanFactory, segmentPool, projectService, dialogService, busyService); WordPairsViewModel.Factory wordPairsFactory = () => new WordPairsViewModel(busyService); WordPairViewModel.Factory wordPairFactory = (pair, order) => new WordPairViewModel(projectService, analysisService, pair, order); var globalCorrespondences = new GlobalCorrespondencesViewModel(projectService, busyService, dialogService, imageExportService, graphService, wordPairsFactory, wordPairFactory); CogProject project = TestHelpers.GetTestProject(_spanFactory, segmentPool); project.Meanings.AddRange(new[] { new Meaning("gloss1", "cat1"), new Meaning("gloss2", "cat2"), new Meaning("gloss3", "cat3") }); project.Varieties.AddRange(new[] { new Variety("variety1"), new Variety("variety2"), new Variety("variety3") }); project.Varieties[0].Words.AddRange(new[] { new Word("hɛ.loʊ", project.Meanings[0]), new Word("gʊd", project.Meanings[1]), new Word("kæd", project.Meanings[2]) }); project.Varieties[1].Words.AddRange(new[] { new Word("hɛlp", project.Meanings[0]), new Word("gu.gəl", project.Meanings[1]), new Word("gu.fi", project.Meanings[2]) }); project.Varieties[2].Words.AddRange(new[] { new Word("wɜrd", project.Meanings[0]), new Word("kɑr", project.Meanings[1]), new Word("fʊt.bɔl", project.Meanings[2]) }); projectService.Project.Returns(project); analysisService.SegmentAll(); var varietyPairGenerator = new VarietyPairGenerator(); varietyPairGenerator.Process(project); var wordPairGenerator = new SimpleWordPairGenerator(segmentPool, project, 0.3, ComponentIdentifiers.PrimaryWordAligner); var globalCorrIdentifier = new SoundCorrespondenceIdentifier(segmentPool, project, ComponentIdentifiers.PrimaryWordAligner); foreach (VarietyPair vp in project.VarietyPairs) { wordPairGenerator.Process(vp); foreach (WordPair wp in vp.WordPairs) { wp.PredictedCognacy = true; } vp.CognateSoundCorrespondenceFrequencyDistribution = new ConditionalFrequencyDistribution <SoundContext, Ngram <Segment> >(); vp.CognateSoundCorrespondenceProbabilityDistribution = new ConditionalProbabilityDistribution <SoundContext, Ngram <Segment> >(vp.CognateSoundCorrespondenceFrequencyDistribution, (sc, fd) => new MaxLikelihoodProbabilityDistribution <Ngram <Segment> >(fd)); globalCorrIdentifier.Process(vp); } projectService.AreAllVarietiesCompared.Returns(true); projectService.ProjectOpened += Raise.Event(); WordPairsViewModel observedWordPairs = globalCorrespondences.ObservedWordPairs; observedWordPairs.WordPairsView = new ListCollectionView(observedWordPairs.WordPairs); FindViewModel findViewModel = null; Action closeCallback = null; dialogService.ShowModelessDialog(globalCorrespondences, Arg.Do <FindViewModel>(vm => findViewModel = vm), Arg.Do <Action>(callback => closeCallback = callback)); globalCorrespondences.FindCommand.Execute(null); Assert.That(findViewModel, Is.Not.Null); Assert.That(closeCallback, Is.Not.Null); // already open, shouldn't get opened twice dialogService.ClearReceivedCalls(); globalCorrespondences.FindCommand.Execute(null); dialogService.DidNotReceive().ShowModelessDialog(globalCorrespondences, Arg.Any <FindViewModel>(), Arg.Any <Action>()); // form searches findViewModel.Field = FindField.Form; // no word pairs, no match findViewModel.String = "nothing"; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.Empty); globalCorrespondences.SelectedCorrespondence = globalCorrespondences.Graph.Edges.First(e => e.Source.StrRep == "k" && e.Target.StrRep == "g"); WordPairViewModel[] wordPairsArray = observedWordPairs.WordPairsView.Cast <WordPairViewModel>().ToArray(); // nothing selected, no match findViewModel.String = "nothing"; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.Empty); // nothing selected, matches findViewModel.String = "d"; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[1].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); // first word selected, matches observedWordPairs.SelectedWordPairs.Clear(); observedWordPairs.SelectedWordPairs.Add(wordPairsArray[0]); findViewModel.String = "g"; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[1].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); // start search over findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[1].ToEnumerable())); // last word selected, matches observedWordPairs.SelectedWordPairs.Clear(); observedWordPairs.SelectedWordPairs.Add(wordPairsArray[2]); findViewModel.String = "u"; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); // nothing selected, matches, change selected word observedWordPairs.SelectedWordPairs.Clear(); findViewModel.String = "."; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); observedWordPairs.SelectedWordPairs.Clear(); observedWordPairs.SelectedWordPairs.Add(wordPairsArray[1]); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[2].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); // gloss searches findViewModel.Field = FindField.Gloss; findViewModel.String = "gloss2"; findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[1].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); findViewModel.FindNextCommand.Execute(null); Assert.That(observedWordPairs.SelectedWordPairs, Is.EquivalentTo(wordPairsArray[0].ToEnumerable())); }