Beispiel #1
0
 public void GetData_ShouldGetAllWords()
 {
     _wordRepository.GetData().Returns(new List <string> {
         "namas", "namas2"
     });
     _wordsService.GetData().ShouldBe(new List <string> {
         "namas", "namas2"
     });
 }
Beispiel #2
0
        public void Start()
        {
            ArrayList words       = DataReader.GetData();
            String    writtenWord = Graphic.GetWords();

            string[] splittedWords = writtenWord.Split(' ', '\t');

            ArrayList toFind = new ArrayList();

            foreach (String word in splittedWords)
            {
                String lowerCaseWord = word.ToLower();
                toFind.Add(lowerCaseWord);
            }

            List <string> findedWords = null;

            if (toFind.Count > 0)
            {
                findedWords = Solver.FindWords(words, toFind);
            }

            Graphic.WriteWords(findedWords);
        }
Beispiel #3
0
 public List <string> GetData()
 {
     return(WordsRepository.GetData());
 }
Beispiel #4
0
 static Dependencies()
 {
     SetEF_CF();
     Solver = new OneWordFinder(WordRepository.GetData());
 }