Пример #1
0
        public void FromStorageFolder_InheritableThrowsNotSupported()
        {
            IStorageFolder folder = new StorageFolderMock();

            Assert.Throws <NotSupportedException>(() => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Inheritable));
        }
Пример #2
0
        public void FromStorageFolder_BadAccessThrowsOutOfRange()
        {
            IStorageFolder folder = new StorageFolderMock();

            AssertExtensions.Throws <ArgumentOutOfRangeException>("access", () => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, (FileAccess)100));
        }
Пример #3
0
        public void FromStorageFolder_BadOptionsThrowsOutOfRange()
        {
            IStorageFolder folder = new StorageFolderMock();

            Assert.Throws <ArgumentOutOfRangeException>("options", () => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read, (FileOptions)100));
        }
Пример #4
0
        public void FromStorageFolder_BadModeThrowsOutOfRange()
        {
            IStorageFolder folder = new StorageFolderMock();

            AssertExtensions.Throws <ArgumentOutOfRangeException>("mode", () => folder.CreateSafeFileHandle("Foo", (FileMode)100));
        }