public void Setup() { _repoFile = new TempLiftFile(""); _repo = new LexEntryRepository(_repoFile.Path); AddPicturesConfig config = new AddPicturesConfig(string.Format("<task taskName='AddMissingInfo' visible='true'><indexFileName>{0}</indexFileName></task>", "ArtOfReadingIndexV3_en.txt")); _task = new AddPicturesTask(config, _repo, new TaskMemoryRepository(), new FileLocator(new string[] { WeSay.Project.BasilProject.ApplicationCommonDirectory })); _task.Activate(); }
public void Activate_IndexNotFound_GivesUserMessage() { using (var repoFile = new TempLiftFile("")) { using (var repo = new LexEntryRepository(repoFile.Path)) { AddPicturesConfig config = MakeConfig("Bogus.txt"); var task = new AddPicturesTask(config, repo, new TaskMemoryRepository(), new FileLocator(new string[0])); Assert.Throws <ConfigurationException>(() => task.Activate()); } } }