private void TbSaveSchemaClick(object sender, EventArgs e) { var serviceParameters = new ServiceParameters(OrganizationService, MetadataService, NotificationService, ExceptionService); var controller = new SchemaController(); controller.SaveSchema(serviceParameters, checkedEntity, entityRelationships, entityAttributes, attributeMapping, crmSchemaConfiguration, tbSchemaPath); }
public void SaveSchemaNoEntityAttributeSelected() { NotificationServiceMock.Setup(x => x.DisplayFeedback("Please select at least one attribute for each selected entity!")) .Verifiable(); using (var schemaPathTextBox = new System.Windows.Forms.TextBox()) { var serviceParameters = GenerateMigratorParameters(); var inputAttributeMapping = new AttributeTypeMapping(); var inputCrmSchemaConfiguration = new DataMigration.Config.CrmSchemaConfiguration(); FluentActions.Invoking(() => systemUnderTest.SaveSchema(serviceParameters, inputCheckedEntity, inputEntityRelationships, inputEntityAttributes, inputAttributeMapping, inputCrmSchemaConfiguration, schemaPathTextBox)) .Should() .NotThrow(); } NotificationServiceMock.Verify(x => x.DisplayFeedback("Please select at least one attribute for each selected entity!"), Times.Once); }