public void WhenProvingNoFormatShouldReturnTheProvidedFormat()
 {
     const string Teststring = "TestString";
     FormatableObject person = new FormatableObject();
     string str = person.ToString(Teststring);
     str.Should().Be(Teststring, "because because the provided string had no property declared");
 }
 public void WhenProvingNonExistingPropertyShouldReturnTheFormat()
 {
     const string Teststring = "{TestString}";
     FormatableObject formatableObject = new FormatableObject();
     string str = formatableObject.ToString(Teststring);
     str.Should().Be(Teststring, "because because the provided string had no property declared");
 }
        public void WhenProvingNonExistingPropertyShouldReturnTheFormat()
        {
            const string     Teststring       = "{TestString}";
            FormatableObject formatableObject = new FormatableObject();
            string           str = formatableObject.ToString(Teststring);

            str.Should().Be(Teststring, "because because the provided string had no property declared");
        }
        public void WhenProvingNoFormatShouldReturnTheProvidedFormat()
        {
            const string     Teststring = "TestString";
            FormatableObject person     = new FormatableObject();
            string           str        = person.ToString(Teststring);

            str.Should().Be(Teststring, "because because the provided string had no property declared");
        }
 public void WhenProvingACustomNumberFormatShouldReturnValuesForThatFormat()
 {
     const double DoubleProperty = 13.8;
     FormatableObject formatableObject = new FormatableObject
     {
         DoubleProperty = DoubleProperty
     };
     string str = formatableObject.ToString("{DoubleProperty:F}");
     str.Should().Be(DoubleProperty.ToString("F"), "because we are using a format string to get the value of the 'DoubleProperty' property with a format");
 }
 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");
 }
 public void WhenProvidingAFieldShouldReturnTheFormat()
 {
     const string Intfield = "{IntField}";
     const int TestInt = 15;
     FormatableObject formatableObject = new FormatableObject
     {
         IntField = 15
     };
     string str = formatableObject.ToString(Intfield);
     str.Should().Be(TestInt.ToString(), "because because the provided string had no property declared");
 }
        public void WhenProvingACustomNumberFormatShouldReturnValuesForThatFormat()
        {
            const double     DoubleProperty   = 13.8;
            FormatableObject formatableObject = new FormatableObject
            {
                DoubleProperty = DoubleProperty
            };
            string str = formatableObject.ToString("{DoubleProperty:F}");

            str.Should().Be(DoubleProperty.ToString("F"), "because we are using a format string to get the value of the 'DoubleProperty' property with a format");
        }
        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");
        }
        public void WhenProvidingAFieldShouldReturnTheFormat()
        {
            const string     Intfield         = "{IntField}";
            const int        TestInt          = 15;
            FormatableObject formatableObject = new FormatableObject
            {
                IntField = 15
            };
            string str = formatableObject.ToString(Intfield);

            str.Should().Be(TestInt.ToString(), "because because the provided string had no property declared");
        }