示例#1
0
        public void LowerCase_FetchesInputString_LowersCase()
        {
            //arrange
            RepeatCounterGenerator newRepeatCounterGenerator = new RepeatCounterGenerator("tEsT", "test", "test");
            string testString = "test";
            //act
            string lowerTest = newRepeatCounterGenerator.LowerCase();

            //assert
            Assert.AreEqual(testString, lowerTest);
        }
示例#2
0
        public ActionResult Result()
        {
            string inputString = Request.Form["input-string"];
            string findString  = Request.Form["find-string"];
            string lowerInput  = inputString.ToLower();
            RepeatCounterGenerator newRepeatCounterGenerator = new RepeatCounterGenerator(inputString, findString, lowerInput);

            newRepeatCounterGenerator.LowerCase();
            newRepeatCounterGenerator.BreakString();
            int displayString = newRepeatCounterGenerator.RepeatCount();


            return(View("Index", displayString));
        }