public void ShowOpenFileDialogExtensionTest_WithDefaultFileName_FileTypeNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowOpenFileDialog(null, defaultFileName);
        }
        public void ShowOpenFileDialogExtensionTest_FileTypeNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowOpenFileDialog((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);
        }
        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());
        }
示例#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_WithOwner_WithDefaultFileName()
        {
            var service = new MockFileDialogService();

            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(owner, rtfFileType, defaultFileName));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.AreEqual(owner, service.Owner);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
            Assert.AreEqual(defaultFileName, service.DefaultFileName);
        }
        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 }));
        }
        public void ShowOpenFileDialogExtensionTest_WithOwner_WithDefaultFileName()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            Assert.AreEqual(result, service.ShowOpenFileDialog(owner, rtfFileType, defaultFileName));
            Assert.AreEqual(FileDialogType.OpenFileDialog, service.FileDialogType);
            Assert.AreEqual(owner, service.Owner);
            Assert.AreEqual(rtfFileType, service.FileTypes.Single());
            Assert.AreEqual(defaultFileName, service.DefaultFileName);
        }
        public void ShowOpenFileDialogExtensionTest_WithOwner_OwnerNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowOpenFileDialog(owner, (FileType)null);
        }