예제 #1
0
 public void GivenFileDoesExist_WhenCallExists_ThenReturnTrue()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.Exists.ShouldBeTrue();
 }
예제 #2
0
 public void GetLastWriteTimeUtcReturnsFileWriteTime()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.LastWriteTimeUtc.ShouldEqual(storage.GetLastWriteTime("exists.js").UtcDateTime);
 }
예제 #3
0
 public void FullPathReturnsFilename()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.FullPath.ShouldEqual("~/exists.js");
 }
예제 #4
0
 public void DirectoryReturnsDirectoryPassedToConstructor()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.Directory.ShouldBeSameAs(directory);
 }
예제 #5
0
 public void DeleteRemovesFileFromStorage()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.Delete();
     storage.FileExists("exists.js").ShouldBeFalse();
 }
예제 #6
0
 public void OpenStreamReturnsFileStream()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     var content = file.Open(FileMode.Open, FileAccess.Read, FileShare.Read).ReadToEnd();
     content.ShouldEqual("content");
 }