Beispiel #1
0
        public void LoadStopWords_GivenValidFilePath_ShouldReturnStopWordListFileContent()
        {
            IEnumerable <string> expected = new[] { "Hallo", "das", "ist", "eine", "Teststopwortliste" };

            var actual = _target.LoadStopWords();

            actual.Should().BeEquivalentTo(expected);
        }
        public void Run()
        {
            if (!_userInterfacePortal.AskUserForManuscriptFile(out var manuscriptFilePath))
            {
                return;
            }

            var manuscript    = GetManuscript(manuscriptFilePath);
            var wordsToIgnore = _stopWordProvider.LoadStopWords();

            var comprehensibilityIndex = CalculateComprehensibilityIndex(manuscript, wordsToIgnore);

            _userInterfacePortal.ShowResults(comprehensibilityIndex);
        }