public void LabelTest() { FlexDePlugin target = new FlexDePlugin(); string actual; actual = target.Label; Assert.AreEqual("Pathway", actual); }
public void DialogTest() { FlexDePlugin target = new FlexDePlugin(); helpProvider = new DynamicMock(typeof(IHelpTopicProvider)); using (UtilityDlg expected = new UtilityDlg((IHelpTopicProvider)helpProvider.MockInstance)) target.Dialog = expected; }
public void ToStringTest() { FlexDePlugin target = new FlexDePlugin(); string expected = "Pathway"; string actual; actual = target.ToString(); Assert.AreEqual(expected, actual); }
public void DialogTest() { FlexDePlugin target = new FlexDePlugin(); helpProvider = new DynamicMock(typeof(SIL.FieldWorks.Common.COMInterfaces.IHelpTopicProvider)); UtilityDlg expected = new UtilityDlg((SIL.FieldWorks.Common.COMInterfaces.IHelpTopicProvider)helpProvider.MockInstance); target.Dialog = expected; }
public void LoadUtilitiesTest() { FlexDePlugin target = new FlexDePlugin(); helpProvider = new DynamicMock(typeof(SIL.FieldWorks.Common.COMInterfaces.IHelpTopicProvider)); UtilityDlg exportDialog = new UtilityDlg((SIL.FieldWorks.Common.COMInterfaces.IHelpTopicProvider)helpProvider.MockInstance); target.Dialog = exportDialog; target.LoadUtilities(); // NOTE: The only test is really that it doesn't crash. The variables set have not getters. }
public void LoadUtilitiesTest() { FlexDePlugin target = new FlexDePlugin(); helpProvider = new DynamicMock(typeof(IHelpTopicProvider)); using (UtilityDlg exportDialog = new UtilityDlg((IHelpTopicProvider)helpProvider.MockInstance)) { target.Dialog = exportDialog; target.LoadUtilities(); // NOTE: The only test is really that it doesn't crash. The variables set have not getters. } }
public void ClearLaunchCountTest() { FlexDePlugin target = new FlexDePlugin(); string label = target.Label; ClearLaunchCount(); RegistryKey key = Registry.CurrentUser.OpenSubKey("Software", false).OpenSubKey("SIL", false).OpenSubKey("Fieldworks", false).OpenSubKey(Application.ProductName, false); int actual = int.Parse((string)key.GetValue(label, "0")); int expected = 0; Assert.AreEqual(expected, actual); }
public void ReportingTest() { FlexDePlugin target = new FlexDePlugin(); string label = target.Label; ClearLaunchCount(); Reporting(); Reporting(); while (!MyProcess.KillProcess("Report 1 Launches")) { } }
public void ExportToolTest() { FlexDePlugin target = new FlexDePlugin(); helpProvider = new DynamicMock(typeof(IHelpTopicProvider)); using (UtilityDlg exportDialog = new UtilityDlg((IHelpTopicProvider)helpProvider.MockInstance)) { target.Dialog = exportDialog; string areaChoice = "lexicon"; string toolChoice = "lexiconDictionary"; string exportFormat = "ConfiguredXHTML"; string filePath = Path.Combine(_TestPath, "main.xhtml"); ExportTool(areaChoice, toolChoice, exportFormat, filePath); } }
public void UsageReportTest() { FlexDePlugin target = new FlexDePlugin(); string label = target.Label; ClearLaunchCount(); string emailAddress = string.Empty; string topMessage = string.Empty; int noLaunches = 0; FlexDePlugin.UsageReport(emailAddress, topMessage, noLaunches); while (!MyProcess.KillProcess("Report 0 Launches")) { } }
public void FlexDePluginConstructorTest() { FlexDePlugin target = new FlexDePlugin(); // TODO: TODO: Implement code to verify target"); }