Implements Fieldworks Utility Interface for DictionaryExpress
Inheritance: IUtility
コード例 #1
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		public void LabelTest()
		{
			FlexDePlugin target = new FlexDePlugin();
			string actual;
			actual = target.Label;
			Assert.AreEqual("Pathway", actual);
		}
コード例 #2
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		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;
		}
コード例 #3
0
		public void DialogTest()
		{
			FlexDePlugin target = new FlexDePlugin();
			helpProvider = new DynamicMock(typeof (IHelpTopicProvider));
			using (UtilityDlg expected = new UtilityDlg((IHelpTopicProvider)helpProvider.MockInstance))
				target.Dialog = expected;
		}
コード例 #4
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		public void FlexDePluginConstructorTest()
		{
			FlexDePlugin target = new FlexDePlugin();
			// TODO: TODO: Implement code to verify target");
		}
コード例 #5
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		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);
		}
コード例 #6
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		public void ExportToolTest()
		{
			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;
			string areaChoice = "lexicon";
			string toolChoice = "lexiconDictionary";
			string exportFormat = "ConfiguredXHTML";
			string filePath = Path.Combine(_TestPath, "main.xhtml");
			ExportTool(areaChoice, toolChoice, exportFormat, filePath);
		}
コード例 #7
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		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.
		}
コード例 #8
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		public void ReportingTest()
		{
			FlexDePlugin target = new FlexDePlugin();
			string label = target.Label;
			ClearLaunchCount();
			Reporting();
			Reporting();
			while (!MyProcess.KillProcess("Report 1 Launches"))
			{
			}
		}
コード例 #9
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		public void ToStringTest()
		{
			FlexDePlugin target = new FlexDePlugin();
			string expected = "Pathway";
			string actual;
			actual = target.ToString();
			Assert.AreEqual(expected, actual);
		}
コード例 #10
0
ファイル: FlexDePluginTest.cs プロジェクト: sillsdev/WorldPad
		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"))
			{
			}
		}
コード例 #11
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.
			}
		}