Esempio n. 1
0
        public void SplitWords_HasPunctuation_ShouldReturnWithoutPunctuation()
        {
            // Arrange
            var targetStr = @"Lorem, ipsum!? dolor; sit: posuere.";
            var target    = new TextSplitter();

            // Act
            var actual = target.SplitWords(targetStr);

            // Assert
            actual.ShouldBeEquivalentTo(new[] { "Lorem", "ipsum", "dolor", "sit", "posuere" });
        }
Esempio n. 2
0
        public void SplitWords_HasDoubleSpaces_ShouldReturnWithoutSpaces()
        {
            // Arrange
            var targetStr = @"Lorem ipsum  dolor   sit     posuere.";
            var target    = new TextSplitter();

            // Act
            var actual = target.SplitWords(targetStr);

            // Assert
            actual.ShouldBeEquivalentTo(new[] { "Lorem", "ipsum", "dolor", "sit", "posuere" });
        }