001    /*
002     * Created on Jul 20, 2009
003     *
004     * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
005     * in compliance with the License. You may obtain a copy of the License at
006     *
007     * http://www.apache.org/licenses/LICENSE-2.0
008     *
009     * Unless required by applicable law or agreed to in writing, software distributed under the License
010     * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
011     * or implied. See the License for the specific language governing permissions and limitations under
012     * the License.
013     *
014     * Copyright @2009-2010 the original author or authors.
015     */
016    package org.fest.swing.fixture;
017    
018    import java.util.regex.Pattern;
019    
020    /**
021     * Understands state verification of GUI components that display a tool-tip.
022     *
023     * @author Alex Ruiz
024     * @since 1.2
025     */
026    public interface ToolTipDisplayFixture {
027    
028      /**
029       * Asserts that the toolTip in this fixture's GUI component matches the given value.
030       * @param expected the given value. It can be a regular expression.
031       * @return this fixture.
032       * @throws AssertionError if the toolTip in this fixture's GUI component does not match the given value.
033       */
034      ToolTipDisplayFixture requireToolTip(String expected);
035    
036      /**
037       * Asserts that the toolTip in this fixture's GUI component matches the given regular expression pattern.
038       * @param pattern the regular expression pattern to match.
039       * @return this fixture.
040       * @throws NullPointerException if the given regular expression pattern is <code>null</code>.
041       * @throws AssertionError if the toolTip in this fixture's GUI component does not match the given value.
042       */
043      ToolTipDisplayFixture requireToolTip(Pattern pattern);
044    
045    }