public void CreateNewLangProject_NameHasMultipleNonAsciiCharsRemoved() { using (var dlg = new DummyFwNewLangProject()) { const string dbName = "Fra\u014b\u00e7a\u01b4s\u028c"; // get around changing file type if (DbExists(dbName)) { DestroyDb(dbName, true); } dlg.ProjectName = dbName; try { dlg.SimulatedNonAsciiDialogResult = DialogResult.Cancel; dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsTrue(dlg.NonAsciiWarningWasActivated, "Non-Ascii Project Name should activate the non-Ascii warning."); Assert.AreEqual("Fraas", dlg.ProjectName, "Project Name should have had four non-ASCII characters removed."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameDoesNotHaveNonAsciiCharsRemoved() { using (var dlg = new DummyFwNewLangProject()) { const string dbName = "Fran\u00e7ais"; if (DbExists(dbName)) { DestroyDb(dbName, true); } dlg.ProjectName = dbName; try { dlg.SimulatedNonAsciiDialogResult = DialogResult.OK; dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsTrue(dlg.NonAsciiWarningWasActivated, "Non-Ascii Project Name should activate the non-Ascii warning."); Assert.AreEqual(dbName, dlg.ProjectName, "Project Name should not have non-ASCII character removed."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameDoesntTriggerNonAsciiWarning() { using (var dlg = new DummyFwNewLangProject()) { const string dbName = "Simple"; if (DbExists(dbName)) { DestroyDb(dbName, true); } dlg.ProjectName = dbName; try { dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsFalse(dlg.NonAsciiWarningWasActivated, "Ascii-only Project Name should not activate the non-Ascii warning."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameTriggersNonAsciiWarning() { const string dbName = "Fran\u00e7ais"; using (var dlg = new DummyFwNewLangProject()) { dlg.ProjectName = dbName; if (DbExists(dbName)) { DestroyDb(dbName, true); } try { dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsTrue(dlg.NonAsciiWarningWasActivated, "Project Name should have activated the non-Ascii warning."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameTooLong() { using (var dlg = new DummyFwNewLangProject()) { dlg.ProjectName = "This name will be too long by one character.567890123456789012345"; Assert.Greater(dlg.ProjectName.Length, dlg.MaxProjectNameLength, "Constant maximum Project Name length has changed. Test may need to be modified."); try { dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsEmpty(dlg.ProjectName, "Project Name should have been cleared out."); } finally { dlg.Close(); } } }
public void CreateNewLangProject_NameHasMultipleNonAsciiCharsRemoved() { using (var dlg = new DummyFwNewLangProject()) { const string dbName = "Fra\u014b\u00e7a\u01b4s\u028c"; // get around changing file type if (DbExists(dbName)) DestroyDb(dbName, true); dlg.setProjectName(dbName); try { dlg.SimulatedNonAsciiDialogResult = DialogResult.Cancel; dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsTrue(dlg.NonAsciiWarningWasActivated, "Non-Ascii Project Name should activate the non-Ascii warning."); Assert.AreEqual("Fraas", dlg.ProjectName, "Project Name should have had four non-ASCII characters removed."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameDoesNotHaveNonAsciiCharsRemoved() { using (var dlg = new DummyFwNewLangProject()) { const string dbName = "Fran\u00e7ais"; if (DbExists(dbName)) DestroyDb(dbName, true); dlg.setProjectName(dbName); try { dlg.SimulatedNonAsciiDialogResult = DialogResult.OK; dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsTrue(dlg.NonAsciiWarningWasActivated, "Non-Ascii Project Name should activate the non-Ascii warning."); Assert.AreEqual(dbName, dlg.ProjectName, "Project Name should not have non-ASCII character removed."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameDoesntTriggerNonAsciiWarning() { using (var dlg = new DummyFwNewLangProject()) { const string dbName = "Simple"; if (DbExists(dbName)) DestroyDb(dbName, true); dlg.setProjectName(dbName); try { dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsFalse(dlg.NonAsciiWarningWasActivated, "Ascii-only Project Name should not activate the non-Ascii warning."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }
public void CreateNewLangProject_NameTriggersNonAsciiWarning() { const string dbName = "Fran\u00e7ais"; using (var dlg = new DummyFwNewLangProject()) { dlg.setProjectName(dbName); if (DbExists(dbName)) DestroyDb(dbName, true); try { dlg.Show(); Application.DoEvents(); dlg.TestOkButton(); Assert.IsTrue(dlg.NonAsciiWarningWasActivated, "Project Name should have activated the non-Ascii warning."); } finally { dlg.Close(); // Blow away the database to clean things up DestroyDb(dbName, false); } } }