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

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

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

            service.Result = result;

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

            service.Result = result;

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

            service.Result = result;

            service.ShowOpenFileDialog(owner, null, defaultFileName);
        }
        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());
        }
Beispiel #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());
        }
Beispiel #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 }));
        }
        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);
        }
        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);
        }
        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());
        }
        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);
        }
        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 }));
        }
        public void ShowSaveFileDialogExtensionTest_WithOwner_OwnerNull()
        {
            var service = new MockFileDialogService();
            service.Result = result;

            service.ShowSaveFileDialog(owner, (FileType)null);
        }
        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());
        }
        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);
        }