Package org.easymock

Examples of org.easymock.IArgumentMatcher


      verify(command);
   }

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here


      verify(command);
   }

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here

      verify(command);
   }

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here

* @author Adrian Cole
*/
public abstract class BaseHttpErrorHandlerTest {

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here

        Marshaller marshaller = control.createMock(Marshaller.class);
        ContextUtils.getJAXBContext().createMarshaller();
        EasyMock.expectLastCall().andReturn(marshaller);
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
        EasyMock.expectLastCall();
        IArgumentMatcher matcher = new JAXBEltMatcher();
        int expectedMarshals = requestor ? expectedValues.length - 1 : expectedValues.length;
        for (int i = 0; i < expectedMarshals; i++) {
            EasyMock.reportMatcher(matcher);
            EasyMock.eq(header);
            marshaller.marshal(null, header);
View Full Code Here

        Marshaller marshaller = control.createMock(Marshaller.class);
        ContextUtils.getJAXBContext().createMarshaller();
        EasyMock.expectLastCall().andReturn(marshaller);
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
        EasyMock.expectLastCall();
        IArgumentMatcher matcher = new JAXBEltMatcher();
        int expectedMarshals = requestor
                               ? expectedValues.length - 1
                               : expectedValues.length;
        for (int i = 0; i < expectedMarshals; i++) {
            EasyMock.reportMatcher(matcher);
View Full Code Here

    writer.write(cs);
    verify(mockWriter);
  }
 
  private static char[] expectSingleChar(final char c) {
    reportMatcher(new IArgumentMatcher() {

      private String failureMessage;
     
      public void appendTo(StringBuffer sb) {
        sb.append(failureMessage);
View Full Code Here

  private static char[] expectFirstChars(final char[] cs) {
    return expectFirstChars(cs, cs.length);
  }

  private static char[] expectFirstChars(final char[] cs, final int length) {
    reportMatcher(new IArgumentMatcher() {

      private String failureMessage;
     
      public void appendTo(StringBuffer sb) {
        sb.append(failureMessage);
View Full Code Here

      verify(command);
   }

   public static Exception classEq(final Class<? extends Exception> in) {
      reportMatcher(new IArgumentMatcher() {

         @Override
         public void appendTo(StringBuffer buffer) {
            buffer.append("classEq(");
            buffer.append(in);
View Full Code Here

    reducer.reduce(new VarLongWritable(123L), Arrays.asList(new FloatWritable(4.0f), new FloatWritable(2.0f)), ctx);
    EasyMock.verify(ctx);
  }

  static FeatureVectorWithRatingWritable matchInitializedFeatureVector(final double average, final int numFeatures) {
    EasyMock.reportMatcher(new IArgumentMatcher() {
      @Override
      public boolean matches(Object argument) {
        if (argument instanceof FeatureVectorWithRatingWritable) {
          Vector v = ((FeatureVectorWithRatingWritable) argument).getFeatureVector();
          if (v.get(0) != average) {
View Full Code Here

TOP

Related Classes of org.easymock.IArgumentMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.