public void SetDialogTitle_Configure() { // Configure subclass of CustomListDlg using (var dlg = new ConfigureListDlg(null, null, Cache.LangProject.LocationsOA)) { // Dialog Title should default to "Configure List" Assert.AreEqual("Configure List", dlg.Text, "Dialog default title for ConfigureList dialog is wrong."); } }
public void SetWsComboSelectedItem() { // SUT using (var dlg = new ConfigureListDlg(null, null, Cache.LangProject.LocationsOA)) { dlg.SelectedWs = WritingSystemServices.kwsVerns; // Verify Assert.AreEqual(WritingSystemServices.kwsVerns, dlg.SelectedWs, "Wrong writing system in combo box."); } }
public bool OnConfigureList(object argument) { CheckDisposed(); if (Clerk != null && Clerk.OwningObject != null && (Clerk.OwningObject is ICmPossibilityList)) { using (var dlg = new ConfigureListDlg(m_mediator, (ICmPossibilityList)Clerk.OwningObject)) dlg.ShowDialog(this); } return(true); // handled }
public void SetCheckBoxesToOtherValues() { using (var dlg = new ConfigureListDlg(null, null, Cache.LangProject.LocationsOA)) { // SUT; Set non-default checkbox values dlg.SupportsHierarchy = true; dlg.SortByName = true; dlg.AllowDuplicate = false; // Verify Assert.IsTrue(dlg.SupportsHierarchy, "'Support hierarchy' value should be set to true."); Assert.IsTrue(dlg.SortByName, "'Sort items by name' value should be set to true."); Assert.IsFalse(dlg.AllowDuplicate, "'Allow duplicate items' value should be set to false."); } }
public void SetWsComboSelectedItem() { // SUT using (var dlg = new ConfigureListDlg(null, Cache.LangProject.LocationsOA)) { dlg.SelectedWs = WritingSystemServices.kwsVerns; // Verify Assert.AreEqual(WritingSystemServices.kwsVerns, dlg.SelectedWs, "Wrong writing system in combo box."); } }
public void SetDialogTitle_Configure() { // Configure subclass of CustomListDlg using (var dlg = new ConfigureListDlg(null, Cache.LangProject.LocationsOA)) { // Dialog Title should default to "Configure List" Assert.AreEqual("Configure List", dlg.Text, "Dialog default title for ConfigureList dialog is wrong."); } }
public void SetCheckBoxesToOtherValues() { using (var dlg = new ConfigureListDlg(null, Cache.LangProject.LocationsOA)) { // SUT; Set non-default checkbox values dlg.SupportsHierarchy = true; dlg.SortByName = true; dlg.AllowDuplicate = false; // Verify Assert.IsTrue(dlg.SupportsHierarchy, "'Support hierarchy' value should be set to true."); Assert.IsTrue(dlg.SortByName, "'Sort items by name' value should be set to true."); Assert.IsFalse(dlg.AllowDuplicate, "'Allow duplicate items' value should be set to false."); } }
public bool OnConfigureList(object argument) { CheckDisposed(); if (Clerk != null && Clerk.OwningObject != null && (Clerk.OwningObject is ICmPossibilityList)) using (var dlg = new ConfigureListDlg(m_mediator, (ICmPossibilityList) Clerk.OwningObject)) dlg.ShowDialog(this); return true; // handled }