Aspects.Logging.Tests.Extensions.FormattableObjectExtensionTests.WhenProvingACustomFormatShouldReturnValuesForThatFormat C# (CSharp) Method

WhenProvingACustomFormatShouldReturnValuesForThatFormat() private method

        public void WhenProvingACustomFormatShouldReturnValuesForThatFormat()
        {
            const string Teststring = "Andrei Ignat";
            FormatableObject formatableObject = new FormatableObject
            {
                StringProperty = Teststring
            };
            string str = formatableObject.ToString("{StringProperty}");
            str.Should().Be(Teststring, "because we are using a format string to get the value of the 'StringProperty' property");
        }