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()); }
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()); }
private void OnPreviousClick(object sender, EventArgs e) { m_model.Back(); }