public void TestMatrix20x20NoWordFound() { var dictionary = new string[] { "chilipeppers", "windsurf", "snowboard", "coldy" }; var src = new string[] { "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wwavsaaasdsssdccbbta", "wwavsaaasdsssdccbbta", "wwavsaaasdsssdccbbta", "wsdftyubstxacbmjutew", "wwavsaaasdsssdccbbta", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wsdftyubstxacbmjutew", "wwavsaaasdsssdccbbta", "wwavsaaasdsssdccbbta", "wwavsaaasdsssdccbbta", "wwavsaaasdsssdccbbta", "wwavsaaasdsssdccbbta" }; var result = new WordFinderWorker(dictionary).Find(src) as List <string>; //Define valid expected result var expected = new List <string>() { }; CollectionAssert.AreEquivalent(expected.ToArray(), result.ToArray()); }
public void TestMatrix20x20() { var dictionary = new string[] { "chilipeppers", "windsurf", "snowboard", "coldy" }; var src = new string[] { "wsdftyubstxacbmjutew", "icbmjutewwavsaaasdss", "ntewsdvstaafyusdsdcc", "dddtcbsdsdavsacbcbts", "sbbmtecbcbafyusatewy", "ueedavsachilipeppers", "rdcbafyuwwavstvsbted", "favsaavsbteccbdceseb", "tafyusdcestttebtewsc", "mtecdcbtewwaddtcbsdt", "davsbtebstaabbmtecba", "cbmjuteestteeedavsaa", "tewsdvsewwasdcbafwwb", "ddtcbsdcbmjuavsaabte", "bbmtecbtewsdvsfyuese", "eedavsaddtcbsdteweww", "dcbafyubbmtecbvstvta", "avswwavsaaasdsssddww", "wwavsaaasdsssdccbbta", "snowboarddcccbssatsd" }; var result = new WordFinderWorker(dictionary).Find(src) as List <string>; //Define valid expected result var expected = new List <string>() { "chilipeppers", "windsurf", "snowboard" }; CollectionAssert.AreEquivalent(expected.ToArray(), result.ToArray()); }
public void TestExampleMatrix5x5() { var dictionary = new string[] { "chill", "wind", "snow", "cold" }; var src = new string[] { "abcdc", "fgwio", "chill", "pqnsd", "uvdxy" }; var result = new WordFinderWorker(dictionary).Find(src) as List <string>; //Define valid expected result var expected = new List <string>() { "chill", "wind", "cold" }; CollectionAssert.AreEquivalent(expected.ToArray(), result.ToArray()); }