public void FileIsNotDeletedIfDeletedAfterMergeIsNotSet()
        {
            // Initialise the test
            var fileSystem = this.mocks.StrictMock<IFileSystem>();
            var file = new FileInfo(this.filename);
            SetupResult.For(fileSystem.FileExists(file.FullName)).Return(true);

            // Run the test
            this.mocks.ReplayAll();
            var result = new FileTaskResult(file, false, fileSystem);
            result.CleanUp();

            // Check the results
            this.mocks.VerifyAll();
        }
        public void DeleteAfterMergeDeletesTheFile()
        {
            // Initialise the test
            var fileSystem = this.mocks.StrictMock<IFileSystem>();
            var file = new FileInfo(this.filename);
            SetupResult.For(fileSystem.FileExists(file.FullName)).Return(true);
            Expect.Call(() =>
            {
                fileSystem.DeleteFile(file.FullName);
            });

            // Run the test
            this.mocks.ReplayAll();
            var result = new FileTaskResult(file, true, fileSystem);
            result.CleanUp();

            // Check the results
            this.mocks.VerifyAll();
        }
		public void ShouldReadContentsOfTempFile()
		{
			FileTaskResult result = new FileTaskResult(filename);
			Assert.AreEqual("<invalid xml>", result.Data);
		}