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

            actual = target.Label;
            Assert.AreEqual("Pathway", actual);
        }
Ejemplo 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;
        }
Ejemplo n.º 3
0
        public void ToStringTest()
        {
            FlexDePlugin target   = new FlexDePlugin();
            string       expected = "Pathway";
            string       actual;

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

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