コード例 #1
0
        public void GetHyphenSeparatedStringWithoutFirstAndLastElements_ValuesAreValid_ReturnsResult(object[] data)
        {
            // Arrange
            string[] values         = (string[])data[0];
            string   expectedResult = (string)data[1];

            // Act
            string actualResult = JoiningStrings.GetHyphenSeparatedStringWithoutFirstAndLastElements(values);

            // Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #2
0
        public void GetPlusSeparatedString_ValuesAreValid_ReturnsResult(object[] data)
        {
            // Arrange
            IEnumerable <string> values = (IEnumerable <string>)data[0];
            string expectedResult       = (string)data[1];

            // Act
            string actualResult = JoiningStrings.GetPlusSeparatedString(values);

            // Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #3
0
        public void GetColonSeparatedString_ValuesAreValid_ReturnsResult(object[] data)
        {
            // Arrange
            string[] values         = (string[])data[0];
            string   expectedResult = (string)data[1];

            // Act
            string actualResult = JoiningStrings.GetColonSeparatedString(values);

            // Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #4
0
        public void GetStringSeparatedString_ValuesAreValid_ReturnsResult(object[] data)
        {
            // Arrange
            object[] values         = (object[])data[0];
            string   expectedResult = (string)data[1];

            CultureInfo currentCulture = CultureInfo.CurrentCulture;

            CultureInfo.CurrentCulture = new CultureInfo("en-US");

            // Act
            string actualResult = JoiningStrings.GetStringSeparatedString(values);

            // Tear down
            CultureInfo.CurrentCulture = currentCulture;

            // Assert
            Assert.AreEqual(expectedResult, actualResult);
        }