001/**
002 * Powerunit - A JDK1.8 test framework
003 * Copyright (C) 2014 Mathieu Boretti.
004 *
005 * This file is part of Powerunit
006 *
007 * Powerunit is free software: you can redistribute it and/or modify
008 * it under the terms of the GNU General Public License as published by
009 * the Free Software Foundation, either version 3 of the License, or
010 * (at your option) any later version.
011 *
012 * Powerunit is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015 * GNU General Public License for more details.
016 *
017 * You should have received a copy of the GNU General Public License
018 * along with Powerunit. If not, see <http://www.gnu.org/licenses/>.
019 */
020package ch.powerunit.pattern.lang;
021
022import org.hamcrest.Matcher;
023
024/**
025 * This a step in the process to create a tester of
026 * {@link java.util.regex.Pattern Pattern}.
027 * 
028 * @author borettim
029 *
030 */
031public interface PatternTester4 {
032        /**
033         * Specify a matcher to validate the group.
034         * 
035         * @param matching
036         *            the matcher
037         * @return {@link PatternTester3 the next step of the DSL.}
038         */
039        PatternTester3 matching(Matcher<String> matching);
040
041        /**
042         * Specify an expected String for the group.
043         * <p>
044         * This is a shortcut to <code>matching(equalTo(...))</code>
045         * 
046         * @param equalTo
047         *            the expected String.
048         * @return {@link PatternTester3 the next step of the DSL.}
049         */
050        PatternTester3 equalTo(String equalTo);
051}