35 references to FileState
Microsoft.Build.Tasks.Core (4)
Microsoft.Build.Tasks.UnitTests (31)
FileStateTests.cs (31)
30new FileState(TestPath(""));
36new FileState(TestPath("|"));
42new FileState(TestPath(new String('x', 5000)));
48var state = new FileState(TestPath("|"));
57delegate () { var x = new FileState(TestPath(new String('x', 5000))).LastWriteTime; });
69FileState state = new FileState(TestPath(file));
88FileState state = new FileState(TestPath(file));
101var state = new FileState(TestPath(Path.GetTempPath()));
115FileState state = new FileState(TestPath(file));
134FileState state = new FileState(TestPath(file));
153FileState state = new FileState(TestPath(file));
172FileState state = new FileState(TestPath(file));
191FileState state = new FileState(TestPath(file));
217FileState state = new FileState(TestPath(file));
243FileState state = new FileState(TestPath(file));
269FileState state = new FileState(TestPath(file));
297FileState state = new FileState(TestPath(file));
322FileState state = new FileState(TestPath(file));
339Assert.Equal(new FileInfo(Path.GetTempPath()).Exists, new FileState(TestPath(Path.GetTempPath())).FileExists);
340Assert.True(new FileState(TestPath(Path.GetTempPath())).IsDirectory);
346Assert.Equal(new FileInfo(Path.GetTempPath()).IsReadOnly, new FileState(TestPath(Path.GetTempPath())).IsReadOnly);
352Assert.Equal(new FileInfo(Path.GetTempPath()).LastWriteTime, new FileState(TestPath(Path.GetTempPath())).LastWriteTime);
358Assert.Equal(new FileInfo(Path.GetTempPath()).LastWriteTimeUtc, new FileState(TestPath(Path.GetTempPath())).LastWriteTimeUtcFast);
364Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(Path.GetTempPath()).Length; }, delegate () { var x = new FileState(TestPath(Path.GetTempPath())).Length; });
374Assert.Equal(new FileInfo(file).LastWriteTime, new FileState(TestPath(file)).LastWriteTime);
384Assert.Equal(new FileInfo(file).LastWriteTimeUtc, new FileState(TestPath(file)).LastWriteTimeUtcFast);
392Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(file).Length; }, delegate () { var x = new FileState(TestPath(file)).Length; });
402var x = new FileState(TestPath(file)).IsDirectory;
410Assert.Equal(Directory.Exists(file), new FileState(TestPath(file)).DirectoryExists);
418Assert.False(new FileState(TestPath(file)).FileExists);
419Assert.False(new FileState(TestPath(file)).DirectoryExists);