コード例 #1
0
        public WordTutorApplication Create()
        {
            var alpha = new VocabularyWord("alpha")
                        .WithPhrase("The alpha dog")
                        .WithPronunciation("alfa");

            var beta = new VocabularyWord("beta")
                       .WithPhrase("A beta release")
                       .WithPronunciation("beta");

            var gamma = new VocabularyWord("gamma")
                        .WithPhrase("Gamma radiation")
                        .WithPronunciation("gamma");

            var delta = new VocabularyWord("delta")
                        .WithPhrase("Change is often called delta.")
                        .WithPronunciation("delta");

            var vocabulary = VocabularySet.Empty
                             .Add(alpha)
                             .Add(beta)
                             .Add(gamma)
                             .Add(delta);

            var screen = new VocabularyBrowserScreen()
                         .WithSelection(gamma);

            var application = new WordTutorApplication(screen)
                              .WithVocabularySet(vocabulary);

            return(application);
        }
コード例 #2
0
        public VocabularyBrowserScreenReducerTests()
        {
            var vocabulary = VocabularySet.Empty
                             .Add(Apollo)
                             .Add(Ares)
                             .Add(Dionysus)
                             .Add(Hades);
            var screen =
                new VocabularyBrowserScreen()
                .WithSelection(Ares);

            _initialState = new WordTutorApplication(screen)
                            .WithVocabularySet(vocabulary);
        }
コード例 #3
0
        public VocabularyBrowserViewModelTests()
        {
            _screen = new VocabularyBrowserScreen()
                      .WithSelection(_word)
                      .MarkAsModified();
            var vocabulary = VocabularySet.Empty
                             .Add(_word)
                             .Add(_otherWord);

            _application = new WordTutorApplication(_screen)
                           .WithVocabularySet(vocabulary);
            _store = new FakeApplicationStore(_application);
            _model = new VocabularyBrowserViewModel(_store, _logger);
            _notifyPropertyChanged = new NotifyPropertyChangedProbe(_model);
            _store.ClearCapturedMessages();
        }
コード例 #4
0
 public WithSelection()
 {
     _browser = new VocabularyBrowserScreen()
                .WithSelection(_foo);
 }
コード例 #5
0
            public void AfterConstruction_ModifiedIsFalse()
            {
                var browser = new VocabularyBrowserScreen();

                browser.Modified.Should().BeFalse();
            }
コード例 #6
0
            public void AfterConstruction_SelectionIsNull()
            {
                var browser = new VocabularyBrowserScreen();

                browser.Selection.Should().BeNull();
            }