35 references to FileState
Microsoft.Build.Tasks.Core (4)
Microsoft.Build.Tasks.UnitTests (31)
FileStateTests.cs (31)
25new FileState("");
31new FileState("|");
37new FileState(new String('x', 5000));
43var state = new FileState("|");
52delegate () { var x = new FileState(new String('x', 5000)).LastWriteTime; });
64FileState state = new FileState(file);
83FileState state = new FileState(file);
96var state = new FileState(Path.GetTempPath());
110FileState state = new FileState(file);
129FileState state = new FileState(file);
148FileState state = new FileState(file);
167FileState state = new FileState(file);
186FileState state = new FileState(file);
212FileState state = new FileState(file);
238FileState state = new FileState(file);
264FileState state = new FileState(file);
292FileState state = new FileState(file);
317FileState state = new FileState(file);
334Assert.Equal(new FileInfo(Path.GetTempPath()).Exists, new FileState(Path.GetTempPath()).FileExists);
335Assert.True(new FileState(Path.GetTempPath()).IsDirectory);
341Assert.Equal(new FileInfo(Path.GetTempPath()).IsReadOnly, new FileState(Path.GetTempPath()).IsReadOnly);
347Assert.Equal(new FileInfo(Path.GetTempPath()).LastWriteTime, new FileState(Path.GetTempPath()).LastWriteTime);
353Assert.Equal(new FileInfo(Path.GetTempPath()).LastWriteTimeUtc, new FileState(Path.GetTempPath()).LastWriteTimeUtcFast);
359Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(Path.GetTempPath()).Length; }, delegate () { var x = new FileState(Path.GetTempPath()).Length; });
369Assert.Equal(new FileInfo(file).LastWriteTime, new FileState(file).LastWriteTime);
379Assert.Equal(new FileInfo(file).LastWriteTimeUtc, new FileState(file).LastWriteTimeUtcFast);
387Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(file).Length; }, delegate () { var x = new FileState(file).Length; });
397var x = new FileState(file).IsDirectory;
405Assert.Equal(Directory.Exists(file), new FileState(file).DirectoryExists);
413Assert.False(new FileState(file).FileExists);
414Assert.False(new FileState(file).DirectoryExists);