Ejemplo n.º 1
0
        public void FwNewLangProjectModel_CannotClickFinishWithBlankProjectName()
        {
            var model = new FwNewLangProjectModel();

            model.LoadProjectNameSetup  = () => { };
            model.LoadVernacularSetup   = () => { };
            model.LoadAnalysisSetup     = () => { };
            model.LoadAdvancedWsSetup   = () => { };
            model.LoadAnthropologySetup = () => { };
            model.ProjectName           = DbName;
            var fakeTestWs = new CoreWritingSystemDefinition("fr");

            model.WritingSystemContainer.CurrentVernacularWritingSystems.Add(fakeTestWs);
            model.WritingSystemContainer.VernacularWritingSystems.Add(fakeTestWs);
            model.WritingSystemContainer.CurrentAnalysisWritingSystems.Add(fakeTestWs);
            model.WritingSystemContainer.AnalysisWritingSystems.Add(fakeTestWs);
            Assert.True(model.CanGoNext());
            model.Next();             // Vernacular
            model.Next();             // Analysis
            Assert.True(model.CanFinish());
            model.Back();
            model.Back();
            model.ProjectName = "";
            Assert.False(model.CanFinish());
        }
Ejemplo n.º 2
0
        public void FwNewLangProjectModel_CanGoBack()
        {
            var model = new FwNewLangProjectModel();

            model.LoadProjectNameSetup = () => { };
            model.LoadVernacularSetup  = () => { };
            model.ProjectName          = DbName;
            Assert.False(model.CanGoBack());
            model.Next();
            Assert.True(model.CanGoBack());
            model.Back();
            Assert.False(model.CanGoBack());
        }
Ejemplo n.º 3
0
 private void OnPreviousClick(object sender, EventArgs e)
 {
     m_model.Back();
 }