public void CollectCrmEntityFields() { var entityLogicalName = "contact"; inputCheckedEntity.Add(entityLogicalName); var attributeSet = new HashSet <string>() { "contactId", "firstname", "lastname" }; inputEntityAttributes.Add(entityLogicalName, attributeSet); var inputAttributeMapping = new AttributeTypeMapping(); var schemaConfiguration = new Capgemini.Xrm.DataMigration.Config.CrmSchemaConfiguration(); var entityMetadata = InstantiateEntityMetaData(entityLogicalName); InsertAttributeList(entityMetadata, new List <string> { "contactId", "firstname", "lastname" }); var serviceParameters = GenerateMigratorParameters(); MetadataServiceMock.Setup(x => x.RetrieveEntities(It.IsAny <string>(), It.IsAny <IOrganizationService>(), It.IsAny <IExceptionService>())) .Returns(entityMetadata) .Verifiable(); FluentActions.Invoking(() => systemUnderTest.CollectCrmEntityFields(inputCheckedEntity, schemaConfiguration, inputEntityRelationships, inputEntityAttributes, inputAttributeMapping, serviceParameters)) .Should() .NotThrow(); MetadataServiceMock.VerifyAll(); }
public void CollectCrmEntityFieldsCheckedEntityCountIsZero() { var inputAttributeMapping = new AttributeTypeMapping(); var serviceParameters = GenerateMigratorParameters(); var schemaConfiguration = new Capgemini.Xrm.DataMigration.Config.CrmSchemaConfiguration(); FluentActions.Invoking(() => systemUnderTest.CollectCrmEntityFields(inputCheckedEntity, schemaConfiguration, inputEntityRelationships, inputEntityAttributes, inputAttributeMapping, serviceParameters)) .Should() .NotThrow(); }
public void GenerateXMLFileEmptyFilePath() { using (var tbSchemaPath = new System.Windows.Forms.TextBox()) { var schemaConfiguration = new Capgemini.Xrm.DataMigration.Config.CrmSchemaConfiguration(); FluentActions.Invoking(() => systemUnderTest.GenerateXMLFile(tbSchemaPath, schemaConfiguration)) .Should() .NotThrow(); } }