Exemplo n.º 1
0
        public void EnforceSnakeCase()
        {
            // Arrange
            string[] test = new string[] { "This", "IS", "a", "test" };

            // Act
            string res = UTString.EnforceSnakeCase(test);

            // Assert
            Assert.That(res == "this_is_a_test");
        }
Exemplo n.º 2
0
        public void RepeatedCharacter()
        {
            // Arrange
            string test = "a";

            // Act
            string res = UTString.RepeatedCharacter(test, 5);

            // Assert
            Assert.That(res == "aaaaa");
        }
Exemplo n.º 3
0
        public void EnforceCamelCase()
        {
            // Arrange
            string[] test = new string[] { "This", "IS", "a", "test" };

            // Act
            string res1 = UTString.EnforceCamelCase(true, test);
            string res2 = UTString.EnforceCamelCase(false, test);

            // Assert
            Assert.That(res1 == "ThisIsATest");
            Assert.That(res2 == "thisIsATest");
        }