public void SchemaFolderPathActionWithDialogResultCancel()
        {
            using (var fileDialog = new System.Windows.Forms.SaveFileDialog())
            {
                using (var schemaPathTextBox = new System.Windows.Forms.TextBox())
                {
                    var dialogResult         = System.Windows.Forms.DialogResult.Cancel;
                    var collectionParameters = new CollectionParameters(inputEntityAttributes, inputEntityRelationships, null, null, null, null);

                    FluentActions.Invoking(() => systemUnderTest.SchemaFolderPathAction(NotificationServiceMock.Object, schemaPathTextBox, inputWorkingstate, collectionParameters, dialogResult, fileDialog, (x1, x2, x3, x4, x5) => { }))
                    .Should()
                    .NotThrow();

                    schemaPathTextBox.Text.Should().BeEmpty();
                }
            }
        }
Пример #2
0
        private void ButtonSchemaFolderPathClick(object sender, EventArgs e)
        {
            using (var fileDialog = new SaveFileDialog
            {
                Filter = "XML Files|*.xml",
                OverwritePrompt = false
            })
            {
                var dialogResult         = fileDialog.ShowDialog();
                var controller           = new SchemaController();
                var collectionParameters = new CollectionParameters(entityAttributes, entityRelationships, null, null, null, null);

                controller.SchemaFolderPathAction(NotificationService, tbSchemaPath, workingstate, collectionParameters /*entityAttributes, entityRelationships*/, dialogResult, fileDialog, LoadSchemaFile);
            }
        }