public void RepeatWordCounter_ChangesNumberProperty_CheckNumbs() { RepeatWordCounter newCounter = new RepeatWordCounter("Hello", "Hel3lo Th3ere"); newCounter.CheckNums(); Assert.AreEqual(newCounter.Numbers, false); }
public static void Main() { Console.WriteLine("Welcome to the Word Test"); Console.WriteLine("Please input a sentance"); string userSentence = Console.ReadLine(); Console.WriteLine("Please input what word you would like to check"); string userWord = Console.ReadLine(); RepeatWordCounter newCounter = new RepeatWordCounter(userWord, userSentence); Console.WriteLine($"your word appears {newCounter.SentenceCheckWord()} times in your sentance"); }
public void RepeatWordCounterConstructor_TakesAStringAsParameterAndReturnsItLowerCase_RepeatWordCounter() { RepeatWordCounter newCounter = new RepeatWordCounter("Hello", "Hello There"); Assert.AreEqual(newCounter.Word, "hello"); }
public void RepeatWordCounter_ChecksforNumbersinSentences_SentenceCheckNumbers() { RepeatWordCounter newCounter = new RepeatWordCounter("Hello", "Hel3lo Th3ere"); Assert.AreEqual(newCounter.SentenceCheckNumbers(), false); }
public void RepeatWordCounter_ChecksforNumbersinWords_WordCheckNumbers() { RepeatWordCounter newCounter = new RepeatWordCounter("Hel2lo1", "Hello There"); Assert.AreEqual(newCounter.WordCheckNumbers(), false); }
public void RepeatWordCounter_ReturnsCountofMatchingWordsinSentence_SentenceCheckWord() { RepeatWordCounter newCounter = new RepeatWordCounter("Hello", "Hello There Hello"); Assert.AreEqual(newCounter.SentenceCheckWord(), 2); }
// Test to check for Word input no longer vaild public void RepeatWordCounter_TakesSentenceAndMakesAnArray_SentenceCheckWord() { RepeatWordCounter newCounter = new RepeatWordCounter("Hello", "Hello There"); Assert.AreEqual(newCounter.SentenceCheckWord(), "hello"); }