Example #1
0
        public void PartialStringManipulation()
        {
            NonStart output = new NonStart();

            Assert.AreEqual("owdyowdy", output.GetPartialString("Howdy", "Howdy"));
            Assert.AreEqual("oahow", output.GetPartialString("Woah", "Now"));
        }
        public void NonStartTest()
        {
            NonStart newStr = new NonStart();

            Assert.AreEqual("adews", newStr.GetPartialString("bad", "news"));
            Assert.AreEqual("oodrief", newStr.GetPartialString("good", "grief"));
            Assert.AreEqual("harlierown", newStr.GetPartialString("charlie", "brown"));
        }
Example #3
0
        public void GetPartialString()
        {
            NonStart lae = new NonStart();

            Assert.AreEqual("ellohere", lae.GetPartialString("Hello", "There"));
            Assert.AreEqual("avaode", lae.GetPartialString("java", "code"));
            Assert.AreEqual("hotlava", lae.GetPartialString("shotl", "java"));
        }
Example #4
0
        public void NonStarter()
        {
            NonStart nonStarter = new NonStart();

            Assert.AreEqual("ellohere", nonStarter.GetPartialString("Hello", "There"));
            Assert.AreEqual("ickaxe", nonStarter.GetPartialString("", "Pickaxe"));
            Assert.AreEqual("lick", nonStarter.GetPartialString("flick", ""));
        }
        public void GetPartialStringTest()
        {
            NonStart myNonStart = new NonStart();

            Assert.AreEqual("ellohere", myNonStart.GetPartialString("Hello", "There"));
            Assert.AreEqual("avaode", myNonStart.GetPartialString("java", "code"));
            Assert.AreEqual("hotlava", myNonStart.GetPartialString("Shotl", "java"));
        }
Example #6
0
        public void GetPartialStringVariables()
        {
            NonStart lae = new NonStart();

            Assert.AreEqual("", lae.GetPartialString("a", "a"));
            Assert.AreEqual("OOFWOOFWOOFWOOFWOOFWOOF", lae.GetPartialString("WOOFWOOFWOOFWOOFWOOFWOOF", ""));
            Assert.AreEqual("Zz", lae.GetPartialString("zZ", "Zz"));
        }
        public void StringsOfTwoCharsOrMore(string inputA, string inputB, string expectedResult)
        {
            //----Act-----------------------------------------------
            string testArray = testObj.GetPartialString(inputA, inputB);

            //----Assert-------------------------------------------
            Assert.AreEqual(expectedResult, testArray);
        }
Example #8
0
        public void TestNonStart0Length()
        {
            NonStart strings        = new NonStart();
            string   emptyString    = "";
            string   nonEmptyString = "Hello";

            Assert.AreEqual("ello", strings.GetPartialString(emptyString, nonEmptyString));
            Assert.AreEqual("ello", strings.GetPartialString(nonEmptyString, emptyString));
        }
Example #9
0
        public void PartialStrings_ExpectPartialConcatenation()
        {
            //Arrange
            NonStart exercises = new NonStart();

            //Assert
            Assert.AreEqual("here", exercises.GetPartialString("", "There"));
            Assert.AreEqual("i", exercises.GetPartialString("Hi", ""));
        }
Example #10
0
        public void NonStartTests()
        {
            NonStart nonStartTest = new NonStart();

            Assert.AreEqual("ellohere", nonStartTest.GetPartialString("Hello", "There"));
            Assert.AreEqual("avaode", nonStartTest.GetPartialString("java", "code"));
            Assert.AreEqual("hotlava", nonStartTest.GetPartialString("shotl", "java"));
            Assert.AreEqual("", nonStartTest.GetPartialString("s", "j"));
            Assert.AreEqual("a", nonStartTest.GetPartialString("s", "ja"));
        }
Example #11
0
        public void GetPartialStringTest()
        {
            var exercise = new NonStart();

            //GetPartialString("Hello", "There") → "ellohere"
            Assert.AreEqual("ellohere", exercise.GetPartialString("Hello", "There"));
            //GetPartialString("java", "code") → "avaode"
            Assert.AreEqual("avaode", exercise.GetPartialString("java", "code"));
            //GetPartialString("shotl", "java") → "hotlava"
            Assert.AreEqual("hotlava", exercise.GetPartialString("shotl", "java"));
        }
Example #12
0
        public void TestNonStart()
        {
            string actual  = nonStart.GetPartialString("Hello", "There");
            string actual2 = nonStart.GetPartialString("java", "code");
            string actual3 = nonStart.GetPartialString("shotl", "java");

            //GetPartialString("Hello", "There") → "ellohere"
            //GetPartialString("java", "code") → "avaode"
            //GetPartialString("shotl", "java") → "hotlava"

            Assert.AreEqual("ellohere", actual);
            Assert.AreEqual("avaode", actual2);
            Assert.AreEqual("hotlava", actual3);
        }
Example #13
0
        public void TestNonStartHappyPath()
        {
            NonStart        strings     = new NonStart();
            List <string[]> testStrings = new List <string[]>
            {
                new string[] { "Hello", "There", "ellohere" },
                new string[] { "java", "code", "avaode" },
                new string[] { "shotl", "java", "hotlava" }
            };

            Assert.AreEqual(testStrings[0][2], strings.GetPartialString(testStrings[0][0], testStrings[0][1]));
            Assert.AreEqual(testStrings[1][2], strings.GetPartialString(testStrings[1][0], testStrings[1][1]));
            Assert.AreEqual(testStrings[2][2], strings.GetPartialString(testStrings[2][0], testStrings[2][1]));
        }
Example #14
0
        public void NonStart()
        {
            NonStart frontEnd = new NonStart();
            string   result   = frontEnd.GetPartialString("Hello", "There");

            Assert.AreEqual("ellohere", result);

            string result2 = frontEnd.GetPartialString("java", "code");

            Assert.AreEqual("avaode", result2);

            string result3 = frontEnd.GetPartialString("shotl", "java");

            Assert.AreEqual("hotlava", result3);
        }
        public void GetPartialString_shotljava_hotlava()
        {
            NonStart nonstart = new NonStart();
            string   result   = nonstart.GetPartialString("shotl", "java");

            Assert.AreEqual("hotlava", result);
        }
Example #16
0
        public void NonStartHellohere()
        {
            NonStart frontString = new NonStart();
            string   myString    = frontString.GetPartialString("hello", "there");

            Assert.AreNotEqual("hellohere", myString);
        }
Example #17
0
        public void NonStartTests()
        {
            NonStart nonStart = new NonStart();
            string   result   = nonStart.GetPartialString("Computer", "Programmer");

            Assert.AreEqual("omputerrogrammer", result);

            result = nonStart.GetPartialString("Shotl", "java");
            Assert.AreEqual("hotlava", result);

            result = nonStart.GetPartialString("hi", "my");
            Assert.AreEqual("iy", result);


            result = nonStart.GetPartialString("", "pl");
            Assert.AreEqual("l", result);
        }
        public void NonstartTest1()
        {
            NonStart nonStart = new NonStart();

            string actual = nonStart.GetPartialString("Hello", "There");

            Assert.AreEqual("ellohere", actual);
        }
        public void NonstartTest2()
        {
            NonStart nonStart = new NonStart();

            string actual = nonStart.GetPartialString("java", "code");

            Assert.AreEqual("avaode", actual);
        }
        public void NonstartTest3()
        {
            NonStart nonStart = new NonStart();

            string actual = nonStart.GetPartialString("shotl", "java");

            Assert.AreEqual("hotlava", actual);
        }
        public void GetPartialstring(string a, string b, string expected)
        {
            NonStart ex = new NonStart();

            string actualResult = ex.GetPartialString(a, b);

            Assert.AreEqual(expected, actualResult);
        }
Example #22
0
        public void NonStart()
        {
            NonStart testNonStart = new NonStart();

            Assert.AreEqual("ellohere", testNonStart.GetPartialString("Hello", "There"));
            Assert.AreEqual("avaode", testNonStart.GetPartialString("java", "code"));
            Assert.AreEqual("hotlava", testNonStart.GetPartialString("shotl", "java"));
            Assert.AreEqual("by", testNonStart.GetPartialString("ab", "xy"));
            Assert.AreEqual("b", testNonStart.GetPartialString("ab", "x"));
            Assert.AreEqual("c", testNonStart.GetPartialString("x", "ac"));
            Assert.AreEqual("", testNonStart.GetPartialString("a", "x"));
            Assert.AreEqual("itat", testNonStart.GetPartialString("kit", "kat"));
            Assert.AreEqual("artart", testNonStart.GetPartialString("mart", "dart"));
        }
        public void nonStartTest()
        {
            //GetPartialString("Hello", "There") → "ellohere"
            //GetPartialString("java", "code") → "avaode"
            //GetPartialString("shotl", "java") → "hotlava"

            NonStart testClass = new NonStart();

            string result = testClass.GetPartialString("Hello", "There");

            Assert.AreEqual("ellohere", result);

            result = testClass.GetPartialString("java", "code");
            Assert.AreEqual("avaode", result);

            result = testClass.GetPartialString("shotl", "java");
            Assert.AreEqual("hotlava", result);
        }
Example #24
0
        public void Combine_Two_Strings(string input1, string input2, string expectedString)
        {
            //Arrange
            NonStart testMethod = new NonStart();
            //act
            string resultString = testMethod.GetPartialString(input1, input2);

            //Assert
            Assert.AreEqual(expectedString, resultString);
        }
Example #25
0
        public void DoesHelloThereBecomeElloHere()
        {
            //Arrange
            NonStart joinedString = new NonStart();
            //Act
            string result = joinedString.GetPartialString("Hello", "There");

            //Assert
            Assert.AreEqual("ellohere", result);
        }
Example #26
0
        public void DoesShotlJavaBecomhotlava()
        {
            //Arrange
            NonStart joinedString = new NonStart();
            //Act
            string result = joinedString.GetPartialString("Shotl", "Java");

            //Assert
            Assert.AreEqual("hotlava", result);
        }
Example #27
0
        public void DoesCaolIllaBecomeaollla()
        {
            //Arrange
            NonStart joinedString = new NonStart();
            //Act
            string result = joinedString.GetPartialString("Caol", "Illa");

            //Assert
            Assert.AreEqual("aollla", result);
        }
        public void ShouldReturnOneStringMinusFirstCharacterWithOnlyOneStringOverLengthOne()
        {
            //assert
            NonStart newClass = new NonStart();

            //act
            string resultingString = newClass.GetPartialString("Hhelp me", "y");

            //assert
            Assert.AreEqual("help me", resultingString);
        }
        public void ShouldReturnEmptyStringWithBothLenthOne()
        {
            //assert
            NonStart newClass = new NonStart();

            //act
            string resultingString = newClass.GetPartialString("T", "W");

            //assert
            Assert.AreEqual("", resultingString);
        }
        public void ShouldReturnConcatenationWithoutFirstCharacterBothOverLengthOne()
        {
            //assert
            NonStart newClass = new NonStart();

            //act
            string resultingString = newClass.GetPartialString("TThis", "Wworks");

            //assert
            Assert.AreEqual("Thisworks", resultingString);
        }