Esempio n. 1
0
        public void LabelTest()
        {
            FlexDePlugin target = new FlexDePlugin();
            string       actual;

            actual = target.Label;
            Assert.AreEqual("Pathway", actual);
        }
Esempio n. 2
0
        public void DialogTest()
        {
            FlexDePlugin target = new FlexDePlugin();

            helpProvider = new DynamicMock(typeof(IHelpTopicProvider));
            using (UtilityDlg expected = new UtilityDlg((IHelpTopicProvider)helpProvider.MockInstance))
                target.Dialog = expected;
        }
Esempio n. 3
0
        public void ToStringTest()
        {
            FlexDePlugin target   = new FlexDePlugin();
            string       expected = "Pathway";
            string       actual;

            actual = target.ToString();
            Assert.AreEqual(expected, actual);
        }
Esempio n. 4
0
        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;
        }
Esempio n. 5
0
        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.
        }
Esempio n. 6
0
        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.
            }
        }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
        public void ReportingTest()
        {
            FlexDePlugin target = new FlexDePlugin();
            string       label  = target.Label;

            ClearLaunchCount();
            Reporting();
            Reporting();
            while (!MyProcess.KillProcess("Report 1 Launches"))
            {
            }
        }
Esempio n. 9
0
        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);
            }
        }
Esempio n. 10
0
        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"))
            {
            }
        }
Esempio n. 11
0
 public void FlexDePluginConstructorTest()
 {
     FlexDePlugin target = new FlexDePlugin();
     // TODO: TODO: Implement code to verify target");
 }