public void TestNotUpToDateFile() { TimestampCheck check = new TimestampCheck(); string inputFile = Path.GetTempFileName(); string outputFile = Path.GetTempFileName(); File.SetLastWriteTime(outputFile, File.GetLastWriteTime(inputFile) + new TimeSpan(-1)); List<string> inputFiles = new List<string>(); inputFiles.Add(inputFile); Assert.False(check.IsOutputUpToDate(outputFile, new List<string>(inputFiles))); File.Delete(inputFile); File.Delete(outputFile); }
public void TestNonExistingOutputFile() { TimestampCheck check = new TimestampCheck(); string inputFile = Path.GetTempFileName(); string outputFile = Path.GetTempFileName(); File.Delete(outputFile); List<string> inputFiles = new List<string>(); inputFiles.Add(inputFile); Assert.False(check.IsOutputUpToDate(outputFile, new List<string>(inputFiles))); File.Delete(inputFile); }