Example #1
0
        public void TestFlexChorusMethods()
        {
            int    cOrigEntries = m_cache.LangProject.LexDbOA.EntriesOC.Count;
            string sLiftFile    = Path.GetTempFileName();

            m_cache.EnableBulkLoadingIfPossible(true);
            TestFlexChorusDlg dlg        = new TestFlexChorusDlg(m_cache);
            TestProgress      prog       = new TestProgress();
            string            sLiftFile2 = dlg.Export(sLiftFile, prog);

            Assert.AreEqual(sLiftFile2, sLiftFile);
            string sLiftFile3 = dlg.Merge(sLiftFile2, prog);

            Assert.IsNotNull(sLiftFile3);
            Assert.AreNotEqual(sLiftFile3, sLiftFile);
            string sLogFile = dlg.Import(sLiftFile3, prog);

            Assert.AreEqual(m_cache.LangProject.LexDbOA.EntriesOC.Count, cOrigEntries - 1);
            CheckDeletedEntries();
            CheckModifiedEntry();
            CheckCreatedEntry();
            Assert.IsNotNull(sLogFile);

            // Clean up the temp directory and other debris.
            File.Delete(sLiftFile);
            File.Delete(Path.ChangeExtension(sLiftFile, ".lift-ranges"));               // if it exists...
            File.Delete(sLiftFile3);
            File.Delete(sLogFile);
        }
Example #2
0
		public void TestFlexChorusMethods()
		{
			int cOrigEntries = m_cache.LangProject.LexDbOA.EntriesOC.Count;
			string sLiftFile = Path.GetTempFileName();
			m_cache.EnableBulkLoadingIfPossible(true);
			TestFlexChorusDlg dlg = new TestFlexChorusDlg(m_cache);
			TestProgress prog = new TestProgress();
			string sLiftFile2 = dlg.Export(sLiftFile, prog);
			Assert.AreEqual(sLiftFile2, sLiftFile);
			string sLiftFile3 = dlg.Merge(sLiftFile2, prog);
			Assert.IsNotNull(sLiftFile3);
			Assert.AreNotEqual(sLiftFile3, sLiftFile);
			string sLogFile = dlg.Import(sLiftFile3, prog);
			Assert.AreEqual(m_cache.LangProject.LexDbOA.EntriesOC.Count, cOrigEntries - 1);
			CheckDeletedEntries();
			CheckModifiedEntry();
			CheckCreatedEntry();
			Assert.IsNotNull(sLogFile);

			// Clean up the temp directory and other debris.
			File.Delete(sLiftFile);
			File.Delete(Path.ChangeExtension(sLiftFile, ".lift-ranges"));	// if it exists...
			File.Delete(sLiftFile3);
			File.Delete(sLogFile);
		}