Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2013 Objectos, Fábrica de Software LTDA.
*
* 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 br.com.objectos.testing;
import java.io.File;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.EventObject;
import java.util.List;
import java.util.Map;
import javax.xml.namespace.NamespaceContext;
import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
import org.hamcrest.collection.IsArray;
import org.hamcrest.core.AnyOf;
import org.hamcrest.core.CombinableMatcher.CombinableBothMatcher;
import org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher;
import org.w3c.dom.Node;
/**
* @author [email protected] (Marcio Endo)
*/
public class MoreMatchers {
private MoreMatchers() {
}
public static Matcher equalTo(T operand) {
return new MatcherEqualTo(operand);
}
public static Matcher hasContentsEqualTo(String resourceName) {
return new MatcherFileContents(resourceName);
}
public static MatcherToStringEqualToResource toStringEqualTo(String resourceName) {
return new MatcherToStringEqualToResource(resourceName);
}
//
public static Matcher allOf(Iterable> matchers) {
return Matchers.allOf(matchers);
}
public static Matcher allOf(@SuppressWarnings("unchecked") Matcher super T>... matchers) {
return Matchers.allOf(matchers);
}
public static Matcher allOf(Matcher super T> first, Matcher super T> second) {
return Matchers. allOf(first, second);
}
public static Matcher allOf(Matcher super T> first, Matcher super T> second,
Matcher super T> third) {
return Matchers. allOf(first, second, third);
}
public static Matcher allOf(Matcher super T> first, Matcher super T> second,
Matcher super T> third, Matcher super T> fourth) {
return Matchers. allOf(first, second, third, fourth);
}
public static Matcher allOf(Matcher super T> first, Matcher super T> second,
Matcher super T> third, Matcher super T> fourth, Matcher super T> fifth) {
return Matchers. allOf(first, second, third, fourth, fifth);
}
public static Matcher allOf(Matcher super T> first, Matcher super T> second,
Matcher super T> third, Matcher super T> fourth, Matcher super T> fifth,
Matcher super T> sixth) {
return Matchers. allOf(first, second, third, fourth, fifth, sixth);
}
public static AnyOf anyOf(Iterable> matchers) {
return Matchers.anyOf(matchers);
}
public static AnyOf anyOf(Matcher first, Matcher super T> second,
Matcher super T> third) {
return Matchers.anyOf(first, second, third);
}
public static AnyOf anyOf(Matcher first, Matcher super T> second,
Matcher super T> third,
Matcher super T> fourth) {
return Matchers.anyOf(first, second, third, fourth);
}
public static AnyOf anyOf(Matcher first, Matcher super T> second,
Matcher super T> third,
Matcher super T> fourth, Matcher super T> fifth) {
return Matchers.anyOf(first, second, third, fourth, fifth);
}
public static AnyOf anyOf(Matcher first, Matcher super T> second,
Matcher super T> third,
Matcher super T> fourth, Matcher super T> fifth, Matcher super T> sixth) {
return Matchers.anyOf(first, second, third, fourth, fifth, sixth);
}
public static AnyOf anyOf(Matcher first, Matcher super T> second) {
return Matchers.anyOf(first, second);
}
public static AnyOf anyOf(@SuppressWarnings("unchecked") Matcher super T>... matchers) {
return Matchers.anyOf(matchers);
}
public static CombinableBothMatcher both(Matcher super LHS> matcher) {
return Matchers.both(matcher);
}
public static CombinableEitherMatcher either(Matcher super LHS> matcher) {
return Matchers.either(matcher);
}
public static Matcher describedAs(String description, Matcher matcher, Object... values) {
return Matchers.describedAs(description, matcher, values);
}
public static Matcher> everyItem(Matcher itemMatcher) {
return Matchers.everyItem(itemMatcher);
}
public static Matcher