X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Ftest%2FEasyMockMatchers.java;fp=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Ftest%2FEasyMockMatchers.java;h=0000000000000000000000000000000000000000;hb=8557fbe8c7ea4e1cbcbf10d3c4e8c60c9c1e312b;hp=ef9c5d0f9f110103978d53a6c0165f9d5378b9c8;hpb=34b0dc0bca5a2d99394b9692b4ea14ce9e2141b7;p=utils diff --git a/support/general/src/test/java/org/wamblee/test/EasyMockMatchers.java b/support/general/src/test/java/org/wamblee/test/EasyMockMatchers.java deleted file mode 100644 index ef9c5d0f..00000000 --- a/support/general/src/test/java/org/wamblee/test/EasyMockMatchers.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2008 the original author or authors. - * - * 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.wamblee.test; - -import org.easymock.IArgumentMatcher; -import org.easymock.classextension.EasyMock; - -/** - * Some general matchers for easy mock. - * - * @author Erik Brakkee - */ -public class EasyMockMatchers { - - public static class Any implements IArgumentMatcher { - public Any() { - // Empty - } - - @Override - public boolean matches(Object aArg0) { - return true; - } - - @Override - public void appendTo(StringBuffer aBuf) { - aBuf.append("anyObject()"); - } - } - - /** - * Type-safe matcher to match any object of a given type. - * @param - * @param aType Type. - * @return Returns null. - */ - public static T anyObject(Class aType) { - EasyMock.reportMatcher(new Any()); - return null; - } -}