public void FromStorageFolder_InheritableThrowsNotSupported() { IStorageFolder folder = new StorageFolderMock(); Assert.Throws <NotSupportedException>(() => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Inheritable)); }
public void FromStorageFolder_BadAccessThrowsOutOfRange() { IStorageFolder folder = new StorageFolderMock(); AssertExtensions.Throws <ArgumentOutOfRangeException>("access", () => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, (FileAccess)100)); }
public void FromStorageFolder_BadOptionsThrowsOutOfRange() { IStorageFolder folder = new StorageFolderMock(); Assert.Throws <ArgumentOutOfRangeException>("options", () => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read, (FileOptions)100)); }
public void FromStorageFolder_BadModeThrowsOutOfRange() { IStorageFolder folder = new StorageFolderMock(); AssertExtensions.Throws <ArgumentOutOfRangeException>("mode", () => folder.CreateSafeFileHandle("Foo", (FileMode)100)); }