public void GetLastAccessTime_RaisesArgumentException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) { AssertExtensions.Throws <ArgumentException>("path", null, () => isf.GetLastAccessTime("\0bad")); } }
public void GetLastAccessTime_ThrowsArgumentNull() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) { Assert.Throws <ArgumentNullException>(() => isf.GetLastAccessTime(null)); } }
public void GetLastAccessTime_Closed_ThrowsInvalidOperationException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) { isf.Close(); Assert.Throws <InvalidOperationException>(() => isf.GetLastAccessTime("foo")); } }
public void GetLastAccessTime_ThrowsIsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) { isf.Remove(); Assert.Throws <IsolatedStorageException>(() => isf.GetLastAccessTime("foo")); } }
public void GetLastAccessTime_GetsTime() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) { string file = "GetLastAccessTime_GetsTime"; isf.CreateTestFile(file); // Filesystem timestamps vary in granularity, we can't make a positive assertion that // the time will come before or after the current time. Assert.True(TestHelper.IsTimeCloseToNow(isf.GetLastAccessTime(file))); } }