org.testatoo.cartridge.html4.matcher.Matchers Maven / Gradle / Ivy
/**
* Copyright (C) 2008 Ovea
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.testatoo.cartridge.html4.matcher;
import org.hamcrest.Matcher;
import org.testatoo.cartridge.html4.element.Option;
import org.testatoo.cartridge.html4.element.OptionGroup;
import org.testatoo.cartridge.html4.element.Select;
/**
* This class defines the matchers (based on hamcrest matchers) used in testatoo tests and specific to html4 testing.
*
* @author [email protected]
*/
public class Matchers extends org.testatoo.core.matcher.Matchers {
/**
* To test the number of options in a select element, using the syntax "has(4, options())"
*
* @param num the expected number of options
* @param option the tested element, here : option
* @return a new OptionSize matcher created with the given size
*/
public static Matcher