public void WordsSplit_MustToSplitCorrectly()
        {
            String context             = "design pattern is a general  repeatable     solution...";
            IEnumerable <string> words = fileProcessingService.SplitToWords(context);

            Assert.AreEqual(7, words.Count(), "Words count do not match");

            AssertSplitIsIncorrect(words, 0, "design");
            AssertSplitIsIncorrect(words, 1, "pattern");
            AssertSplitIsIncorrect(words, 2, "is");
            AssertSplitIsIncorrect(words, 3, "a");
            AssertSplitIsIncorrect(words, 4, "general");
            AssertSplitIsIncorrect(words, 5, "repeatable");
            AssertSplitIsIncorrect(words, 6, "solution...");
        }
Beispiel #2
0
 private void Process()
 {
     try
     {
         String context             = _fileProcessingService.LoadFileContext(InputFilePath);
         IEnumerable <string> words = _fileProcessingService.SplitToWords(context);
         Results = _fileProcessingService.WordsToLines(words, MaxLineLenght);
     }
     catch (Exception ex)
     {
         Results = ex.Message;
     }
 }