Ejemplo n.º 1
0
        public IEnumerable <Word> GetWords(int quantityWord)
        {
            var filepath   = configuration.GetConnectionString("FileConnection");
            var wordSource = new FileWordSource(filepath);
            var v          = wordSource.GetWords(quantityWord);

            return(v);
        }
        public void FileWordSourceTest()
        {
            string filename = @"C:\_users\ama\LearningCrossword\code\testdata\testwords.txt";
            //string filename = @"D:\Projects\GitHub\CrosswordLearning\ResourceFile\testwords.txt";
            var fileWordSource = new FileWordSource(filename);

            Assert.IsNotNull(value: fileWordSource);
        }
Ejemplo n.º 3
0
        public IEnumerable <Word> GetLearningWords(int cnt)
        {
            var filepath = configuration.GetConnectionString("FileConnection");
            //filepath = @"C:\_users\ama\LearningCrossword\code\testdata\testwords.txt";
            var wordSource = new FileWordSource(filepath);
            var words      = wordSource.GetLearningWords(cnt);

            return(words);
        }
        public void GetWordsTest()
        {
            string filename = @"C:\_users\ama\LearningCrossword\code\testdata\testwords.txt";
            //string filename = @"D:\Projects\GitHub\CrosswordLearning\ResourceFile\testwords.txt";
            var fileWordSource = new FileWordSource(filename);
            var words          = fileWordSource.GetWords(1);

            Assert.AreEqual(words.Count(), 1);
        }