Esempio n. 1
0
        public void ThreadWorkerStoresMapResults()
        {
            var fileName = new Uri("file:///file1.txt");
            var fileContent = "whatever am i i";
            var mapperCodeFileName = new Uri("file:///SampleMapper.cs");

            storage.Store(storage.GetFileName(fileName), fileContent);
            TestHelpers.LoadToStorage(@"..\..\SampleMapper.cs", mapperCodeFileName, this.storage);
            var worker = new ThreadWorker(this.storage, 1);

            worker.Map(fileName, mapperCodeFileName);
            worker.Join();

            var fileNo = this.storage.ListFiles().Count();

            fileNo.ShouldBe(6);
        }