示例#1
0
        public async Task IntegrationTest_Same_To_Cost()
        {
            var start  = "same";
            var target = "cost";
            IAsyncEnumerable <string> source = _fileService.ReadContentAsync(@"Resources\words-english.txt");

            Stack <ICollection <string> > result = await _wordNavigationService.Seek(start, target, source, CancellationToken.None);

            Assert.IsTrue(result.Count == 1);
            Assert.IsTrue(result.First().Count == 5);
        }
        public async Task ReadContentAsync_ReturnLines_Success()
        {
            IAsyncEnumerable <string> result = _fileService.ReadContentAsync(@"Resources\words-english.txt");

            int count = 0;

            await foreach (var str in result)
            {
                count++;
            }
            Assert.IsTrue(count.Equals(26880));
        }