コード例 #1
0
        public static void ToLowerTrimmed_StringNotLowercaseOrStringIsNotTrimmedOrBoth_ReturnsLowercaseTrimmedString()
        {
            // Arrange
            const string String1   = "This Is Not%(#*&! lower CASE";
            const string Expected1 = "this is not%(#*&! lower case";

            const string String2   = "  this needs a trim ";
            const string Expected2 = "this needs a trim";

            const string String3   = " LoWer Trimmed   ";
            const string Expected3 = "lower trimmed";

            // Act
            string actual1 = String1.ToLowerTrimmed();
            string actual2 = String2.ToLowerTrimmed();
            string actual3 = String3.ToLowerTrimmed();

            // Assert
            Assert.Equal(Expected1, actual1);
            Assert.Equal(Expected2, actual2);
            Assert.Equal(Expected3, actual3);
        }