コード例 #1
0
        public void ShowSaveFileDialogExtensionTest_WithDefaultFileName_FileTypeNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowSaveFileDialog(null, defaultFileName);
        }
コード例 #2
0
        public void ShowSaveFileDialogExtensionTest_FileTypeNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowSaveFileDialog((FileType)null);
        }
コード例 #3
0
        public void ShowOpenFileDialogExtensionTest_WithOwner_OwnerNull()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            service.ShowOpenFileDialog(owner, (FileType)null);
        }
コード例 #4
0
        public void ShowOpenFileDialogExtensionTest_FileTypeNull()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            service.ShowOpenFileDialog((FileType)null);
        }
コード例 #5
0
        public void ShowOpenFileDialogExtensionTest_WithOwner_WithDefaultFileName_FileTypeNull()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            service.ShowOpenFileDialog(owner, null, defaultFileName);
        }
コード例 #6
0
        public void ShowSaveFileDialogExtensionTest()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            Assert.AreEqual(result, service.ShowSaveFileDialog(rtfFileType));
            Assert.AreEqual(FileDialogType.SaveFileDialog, service.FileDialogType);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
        }
コード例 #7
0
        public void ShowOpenFileDialogExtensionTest()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(rtfFileType));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
        }
コード例 #8
0
        public void ShowOpenFileDialogExtensionTest_WithMultipleFileTypes()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(fileTypes));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.IsTrue(service.FileTypes.SequenceEqual(new FileType[] { rtfFileType, xpsFileType }));
        }
コード例 #9
0
        public void ShowOpenFileDialogExtensionTest_WithDefaultFileName()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(rtfFileType, defaultFileName));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
            Assert.AreEqual(defaultFileName, service.DefaultFileName);
        }
コード例 #10
0
        public void ShowSaveFileDialogExtensionTest_WithDefaultFileName()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            Assert.AreEqual(result, service.ShowSaveFileDialog(rtfFileType, defaultFileName));
            Assert.AreEqual(FileDialogType.SaveFileDialog, service.FileDialogType);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
            Assert.AreEqual(defaultFileName, service.DefaultFileName);
        }
コード例 #11
0
        public void ShowSaveFileDialogExtensionTest_WithOwner()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            Assert.AreEqual(result, service.ShowSaveFileDialog(owner, rtfFileType));
            Assert.AreEqual(FileDialogType.SaveFileDialog, service.FileDialogType);
            Assert.AreEqual(owner, service.Owner);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
        }
コード例 #12
0
        public void ShowSaveFileDialogExtensionTest_WithMultipleFileTypes_WithOwner_WithDefaultFileName()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            Assert.AreEqual(result, service.ShowSaveFileDialog(fileTypes, rtfFileType, defaultFileName));
            Assert.AreEqual(FileDialogType.SaveFileDialog, service.FileDialogType);
            Assert.IsTrue(service.FileTypes.SequenceEqual(new FileType[] { rtfFileType, xpsFileType }));
            Assert.AreEqual(rtfFileType, service.DefaultFileType);
            Assert.AreEqual(defaultFileName, service.DefaultFileName);
        }
コード例 #13
0
        public void ShowSaveFileDialogExtensionTest_WithMultipleFileTypes()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            Assert.AreEqual(result, service.ShowSaveFileDialog(fileTypes));
            Assert.AreEqual(FileDialogType.SaveFileDialog, service.FileDialogType);
            Assert.IsTrue(service.FileTypes.SequenceEqual(new FileType[] { rtfFileType, xpsFileType }));
        }
コード例 #14
0
        public void ShowSaveFileDialogExtensionTest_WithOwner_OwnerNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowSaveFileDialog(owner, (FileType)null);
        }
コード例 #15
0
        public void ShowOpenFileDialogExtensionTest_WithOwner()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(owner, rtfFileType));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.AreEqual(owner, service.Owner);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
        }
コード例 #16
0
        public void ShowOpenFileDialogExtensionTest_WithMultipleFileTypes_WithOwner_WithDefaultFileName()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(fileTypes, rtfFileType, defaultFileName));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.IsTrue(service.FileTypes.SequenceEqual(new FileType[] { rtfFileType, xpsFileType }));
            Assert.AreEqual(rtfFileType, service.DefaultFileType);
            Assert.AreEqual(defaultFileName, service.DefaultFileName);
        }