Ejemplo n.º 1
0
        public void should_append_environment_and_lifecycle_stage()
        {
            var result = new SerialHubSpotContact();

            MappingExpressionExtensions.AddTangentialAttributesToHubSpotProperties(result, "dev");

            result.Properties.First(item => item.Name == "environment").Value.Should().Be("dev");
            result.Properties.First(item => item.Name == "lifecyclestage").Value.Should().Be("customer");
        }
Ejemplo n.º 2
0
        public void should_append_environment_and_lifecycle_stage_when_they_dont_already_exist()
        {
            var result = new SerialHubSpotContact
            {
                Properties = new List <HubSpotContactProperty>
                {
                    new HubSpotContactProperty
                    {
                        Name  = "environment",
                        Value = "PRODUCTION"
                    },
                    new HubSpotContactProperty
                    {
                        Name  = "lifecyclestage",
                        Value = "boss!"
                    }
                }
            };

            MappingExpressionExtensions.AddTangentialAttributesToHubSpotProperties(result, "dev");

            result.Properties.First(item => item.Name == "environment").Value.Should().Be("PRODUCTION");
            result.Properties.First(item => item.Name == "lifecyclestage").Value.Should().Be("boss!");
        }