Пример #1
0
            public void the_master_contact_records_duplicate_status_should_be_changed_to_none()
            {
                // Arrange
                var context = new XrmFakedContext();

                context.Initialize(new[] { TestMasterContact });

                var reference = new EntityReference(Contact.EntityLogicalName, Guid.Parse(MasterContactId));

                // Act
                context.ExecutePluginWithTargetReference <DuplicateMergeUpdateStatusPlugin>(reference, PluginMessage.Merge);

                // Assert
                context.GetOrganizationService().Retrieve
                (
                    Contact.EntityLogicalName, Guid.Parse(MasterContactId), new ColumnSet("contactid", "opc_duplicatedetectionresult")
                )
                .ToEntity <Contact>().opc_duplicatedetectionresult.Value.Should().Be(opc_DuplicateDetectionResult.None);
            }