public void IsDirty_returns_true_for_0_output_files() { var job = CodegenStub.GetCleanInstance(); job.AddInputFile("my/filepath", DateTime.Now); Assert.IsTrue(job.IsDirty()); }
public void MarkAsDirty_triggers_override() { var job = CodegenStub.GetCleanInstance(); job.MarkAsDirty(); Assert.IsTrue(job.IsDirty()); }
public void IsDirty_returns_true_if_input_most_recently_changed() { var job = CodegenStub.GetCleanInstance(); job.AddOutputFile("output/test.cs", DateTime.Now, true); job.AddOutputFile("output/test2.cs", DateTime.Now, true); job.AddInputFile("input/file.schema", DateTime.Now); Assert.IsTrue(job.IsDirty()); }
public void IsDirty_returns_true_if_missing_output_files() { var job = CodegenStub.GetCleanInstance(); job.AddInputFile("input/file.schema", DateTime.Now); job.AddOutputFile("output/test.cs", DateTime.Now, true); job.AddOutputFile("output/test2.cs", DateTime.Now, false); Assert.IsTrue(job.IsDirty()); }
public void Clean_deletes_all_output_files() { var job = CodegenStub.GetCleanInstance(); job.AddOutputFile("output/test.cs", DateTime.Now, true); job.AddOutputFile("output/test2.cs", DateTime.Now, true); job.Clean(); var files = job.myFileSystem.GetFilesInDirectory("output").Cast <MockFile>(); foreach (var file in files) { Assert.IsTrue(file.WasDeleted); } }