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); }
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)); }