public void GivenFileDoesExist_WhenCallExists_ThenReturnTrue()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.Exists.ShouldBeTrue();
 }
 public void GetLastWriteTimeUtcReturnsFileWriteTime()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.LastWriteTimeUtc.ShouldEqual(storage.GetLastWriteTime("exists.js").UtcDateTime);
 }
 public void FullPathReturnsFilename()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.FullPath.ShouldEqual("~/exists.js");
 }
 public void DirectoryReturnsDirectoryPassedToConstructor()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.Directory.ShouldBeSameAs(directory);
 }
 public void DeleteRemovesFileFromStorage()
 {
     var file = new IsolatedStorageFileWrapper("~/exists.js", storage, directory);
     file.Delete();
     storage.FileExists("exists.js").ShouldBeFalse();
 }
 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");
 }