public void GivenFileDoesNotExist_WhenCallExists_ThenReturnFalse()
 {
     var file = new IsolatedStorageFile("~/not-exists.js", storage, directory);
     file.Exists.ShouldBeFalse();
 }
 public void OpenStreamReturnsFileStream()
 {
     var file = new IsolatedStorageFile("~/exists.js", storage, directory);
     var content = file.Open(FileMode.Open, FileAccess.Read, FileShare.Read).ReadToEnd();
     content.ShouldEqual("content");
 }
 public void GivenFileDoesExist_WhenCallExists_ThenReturnTrue()
 {
     var file = new IsolatedStorageFile("~/exists.js", storage, directory);
     file.Exists.ShouldBeTrue();
 }
 public void GetLastWriteTimeUtcReturnsFileWriteTime()
 {
     var file = new IsolatedStorageFile("~/exists.js", storage, directory);
     file.LastWriteTimeUtc.ShouldEqual(storage.GetLastWriteTime("exists.js").UtcDateTime);
 }
 public void FullPathReturnsFilename()
 {
     var file = new IsolatedStorageFile("~/exists.js", storage, directory);
     file.FullPath.ShouldEqual("~/exists.js");
 }
 public void DirectoryReturnsDirectoryPassedToConstructor()
 {
     var file = new IsolatedStorageFile("~/exists.js", storage, directory);
     file.Directory.ShouldBeSameAs(directory);
 }
 public void DeleteRemovesFileFromStorage()
 {
     var file = new IsolatedStorageFile("~/exists.js", storage, directory);
     file.Delete();
     storage.FileExists("exists.js").ShouldBeFalse();
 }