// ReSharper disable IdentifierTypo // ReSharper disable StringLiteralTypo public void ThreeWords_ReturnsExpectedResults() { Anacrostic anacrostic = new Anacrostic("whichzonepretty"); // ReSharper restore StringLiteralTypo // ReSharper restore IdentifierTypo anacrostic.FindNextWord(); anacrostic.RemoveWord("which"); anacrostic.RemoveWord("zone"); anacrostic.RemoveWord("pretty"); Assert.AreEqual("", anacrostic.RemainingLetters()); Assert.AreEqual( @"clue for which clue for zone W H I C H Z O N E A1 A2 A3 A4 A5 B6 B7 B8 B9 clue for pretty P R E T T Y C10 C11 C12 C13 C14 C15 ", anacrostic.WordsFormattedForGoogleDocs()); Assert.AreEqual( @"A1A2A3A4A5B6", anacrostic.EncodedPhrase); }
public void IgnoresWords() { Anacrostic anacrostic = new Anacrostic("keep"); anacrostic.IgnoreWord("keep"); Assert.AreEqual("peek", anacrostic.FindNextWord()); }
public void WHICH_FindsWord() { // ReSharper disable StringLiteralTypo Anacrostic anacrostic = new Anacrostic("whic h"); // ReSharper restore StringLiteralTypo Assert.AreEqual("which", anacrostic.FindNextWord()); }
public void SimpleExample_FindsKEEPS() { // ReSharper disable StringLiteralTypo Anacrostic anacrostic = new Anacrostic("kbpmmurrhhstttttteeee"); // ReSharper restore StringLiteralTypo anacrostic.WordsFoundSoFar.Add("there"); Assert.AreEqual("keeps", anacrostic.FindNextWord()); }
//[Ignore("Takes more than 3 seconds.")] //Takes more than 3 seconds, but covers most of the class. // ReSharper disable IdentifierTypo // ReSharper disable StringLiteralTypo public void WHICHZ_ReturnsExpectedResults() { Anacrostic anacrostic = new Anacrostic("whichZ".ToLowerInvariant()); // ReSharper restore StringLiteralTypo // ReSharper restore IdentifierTypo anacrostic.FindNextWord(); anacrostic.RemoveWord("which"); Assert.AreEqual("z", anacrostic.RemainingLetters()); Assert.AreEqual( @"clue for which clue for z W H I C H Z A1 A2 A3 A4 A5 B6 ", anacrostic.WordsFormattedForGoogleDocs()); Assert.AreEqual( @"which A1 A2 A3 A4 A5 z B6 ", anacrostic.WordsWithNumberedBlanks()); }
public void FindsThreeLetterWords() { Anacrostic anacrostic = new Anacrostic("m om"); Assert.AreEqual("mom", anacrostic.FindNextWord()); }
public void FourLetterExample_FindsPEEK() { Anacrostic anacrostic = new Anacrostic("keep"); Assert.AreEqual("peek", anacrostic.FindNextWord()); }
public void WillNotFindWordWithRepeatedLetters_IfNotEnoughLettersRemain() { Anacrostic anacrostic = new Anacrostic("pule"); Assert.AreEqual(null, anacrostic.FindNextWord()); }
public void NonWords_FindsNothing(string phrase) { Anacrostic anacrostic = new Anacrostic(phrase); Assert.IsNull(anacrostic.FindNextWord()); }
public void FindsLint() { Anacrostic anacrostic = new Anacrostic("lin t"); Assert.AreEqual("lint", anacrostic.FindNextWord()); }