public void NotFindsPositionOfBWordInOneLetterMatrixWithACharacter() { WordPuzzle wordPuzzle = new WordPuzzle(new char[, ] { { 'a' } }); Assert.AreEqual(null, wordPuzzle.SearchWord("b")); }
public void FindsPositionOfHojInFirstColumn() { var wordPuzzle = new WordPuzzle(new[, ] { { 'a' }, { 'h' }, { 'o' }, { 'j' } }); Assert.AreEqual(new Vector { First = new Point { X = 0, Y = 1 }, Last = new Point { X = 0, Y = 3 } }, wordPuzzle.SearchWord("hoj")); }
public void FindsPositionOfHojWordInMatrixWithMultipleLines() { var wordPuzzle = new WordPuzzle(new[, ] { { 'a', 'h', 'o', 's' }, { 'a', 'h', 'o', 'j' } }); Assert.AreEqual(new Vector { First = new Point { X = 1, Y = 1 }, Last = new Point { X = 3, Y = 1 } }, wordPuzzle.SearchWord("hoj")); }
public void FindsPositionOfAWordInOneLetterMatrixWithACharacter() { WordPuzzle wordPuzzle = new WordPuzzle(new char[, ] { { 'a' } }); Assert.AreEqual(new Vector() { First = new Point() { X = 0, Y = 0 }, Last = new Point() { X = 0, Y = 0 }, } , wordPuzzle.SearchWord("a")); }