/// <summary>
        /// Builds the <see cref="FormItemMetadata"/> view-model object with message structures for given properties.
        /// </summary>
        /// <returns>The <see cref="FormItemMetadata"/> view-model object</returns>
        public FormItemMetadata Build()
        {
            var formItemMetadata = new FormItemMetadata();

            formItemMetadata.Init(_properties);
            return(formItemMetadata);
        }
        public void InitializingFormItemMetadataSecondTimeShouldReplaceOldPropertiesWithNewOnes()
        {
            List <string> newProperties = new List <string>
            {
                "Property4",
                "Property5"
            };

            _sut.Init(newProperties);

            _sut.SetMessage(newProperties[0], _messageText, MessageType.Invalid);
            var message = _sut.GetMessage(newProperties[0]);

            message.Text.Should().Be(_messageText);
            message.Type.Should().Be(MessageType.Invalid);
        }