AddExistingFile() публичный Метод

Adds the given filename to the collection of files that should be considered to exist.
public AddExistingFile ( string filename ) : void
filename string The filename (may or may not include path).
Результат void
		public void ImportProjectIsAccessible_Paratext6()
		{
			IScrImportSet importSettings = Cache.ServiceLocator.GetInstance<IScrImportSetFactory>().Create();
			Cache.LanguageProject.TranslatedScriptureOA.ImportSettingsOC.Add(importSettings);
			importSettings.ImportTypeEnum = TypeOfImport.Paratext6;

			var fileOs = new MockFileOS();
			MockParatextHelper ptHelper = null;
			try
			{
				FileUtils.Manager.SetFileAdapter(fileOs);
				ptHelper = new MockParatextHelper();
				ParatextHelper.Manager.SetParatextHelperAdapter(ptHelper);
				string paratextDir = ParatextHelper.ProjectsDirectory;

				ptHelper.AddProject("TEV", null, null, true, false, "100001");

				fileOs.AddExistingFile(Path.Combine(paratextDir, "TEV.ssf"));

				importSettings.ParatextScrProj = "KAM";
				importSettings.ParatextBTProj = "TEV";

				StringCollection projectsNotFound;
				Assert.IsFalse(importSettings.ImportProjectIsAccessible(out projectsNotFound));
				Assert.AreEqual(1, projectsNotFound.Count);
				Assert.AreEqual("KAM", projectsNotFound[0]);

				fileOs.AddExistingFile(Path.Combine(paratextDir, "KAM.ssf"));
				ptHelper.AddProject("KAM", null, null, true, false, "000101");
				Assert.IsTrue(importSettings.ImportProjectIsAccessible(out projectsNotFound));
			}
			finally
			{
				ParatextHelper.Manager.Reset();
				if (ptHelper != null)
					ptHelper.Dispose();
				FileUtils.Manager.Reset();
			}
		}