/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2017 Yegor Bugayenko
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package org.cactoos.text;

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;

/**
 * Test case for {@link SplitText}.
 * @author Alexey Semenyuk (semenyukalexey@gmail.com)
 * @version $Id$
 * @since 0.9
 * @checkstyle JavadocMethodCheck (500 lines)
 */
public final class SplitTextTest {

    @Test
    public void splitText() throws Exception {
        MatcherAssert.assertThat(
            "Can't split a text",
            new SplitText(
                "Hello world!", "\\s+"
            ),
            Matchers.contains(
                "Hello",
                "world!"
            )
        );
    }

    @Test
    public void splitEmptyText() throws Exception {
        MatcherAssert.assertThat(
            "Can't split an empty text",
            new SplitText("", "\n"),
            Matchers.emptyIterable()
        );
    }

}

@@ -1353,16 +1353,63 @@
 il.com)%0A
+ * @author Mehmet Yildirim (memoyil@gmail.com)%0A
  * @vers
@@ -2065,10 +2065,1013 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void splitStringWithTextRegex() throws Exception %7B%0A        MatcherAssert.assertThat(%0A            %22Can't split an string with text regex%22,%0A            new SplitText(%22Cactoos OOP!%22, new TextOf(%22%5C%5Cs%22)),%0A            Matchers.contains(%0A                %22Cactoos%22,%0A                %22OOP!%22%0A            )%0A        );%0A    %7D%0A%0A    @Test%0A    public void splitTextWithStringRegex() throws Exception %7B%0A        MatcherAssert.assertThat(%0A            %22Can't split an text with string regex%22,%0A            new SplitText(new TextOf(%22Cact4Primitives!%22), %22%5C%5Cd+%22),%0A            Matchers.contains(%0A                %22Cact%22,%0A                %22Primitives!%22%0A            )%0A        );%0A    %7D%0A%0A    @Test%0A    public void splitTextWithTextRegex() throws Exception %7B%0A        MatcherAssert.assertThat(%0A            %22Can't split an text with text regex%22,%0A            new SplitText(new TextOf(%22Split#OOP!%22), %22%5C%5CW+%22),%0A            Matchers.contains(%0A                %22Split%22,%0A                %22OOP%22%0A            )%0A        );%0A    %7D%0A%0A
 %7D%0A

Add TestCases #392