Package org.easymock

Examples of org.easymock.AbstractMatcher


    listener.beforeIndexingFile(getFileFromClasspath("test.txt"));
    listenerControl.setVoidCallable(1);

    indexWriter.addDocument(document);
    indexWriterControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof Document && actual instanceof Document ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here


    listener.beforeIndexingFile(getFileFromClasspath("test.foo"));
    listenerControl.setVoidCallable(1);

    indexWriter.addDocument(document);
    indexWriterControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof Document && actual instanceof Document ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here

    listener2.beforeIndexingFile(getFileFromClasspath("test.txt"));
    listener2Control.setVoidCallable(1);

    indexWriter.addDocument(document);
    indexWriterControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof Document && actual instanceof Document ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here

    listener.beforeIndexingFile(getFileFromClasspath("test.txt"));
    listenerControl.setVoidCallable(1);

    indexWriter.addDocument(document);
    indexWriterControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof Document && actual instanceof Document ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here

   
    listener.beforeIndexingRequest(request1);
    listenerControl.setVoidCallable(1);
   
    indexWriter.addDocument(document1);
    indexWriterControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof Document && actual instanceof Document ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here

   
    listener.beforeIndexingRequest(request1);
    listenerControl.setVoidCallable(1);
   
    listener.onErrorIndexingRequest(request1, ex);
    listenerControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof DataAccessException && actual instanceof DataAccessException ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here

   
    listener.beforeIndexingRequest(request1);
    listenerControl.setVoidCallable(1);
   
    indexWriter.addDocument(document1);
    indexWriterControl.setMatcher(new AbstractMatcher() {
      protected boolean argumentMatches(Object expected, Object actual) {
        if( expected instanceof Document && actual instanceof Document ) {
          return true;
        } else {
          return expected.equals(actual);
View Full Code Here

        return a;
    }

    private static ArgumentsMatcher createArgumentMatcher()
    {
        return new AbstractMatcher()
        {
            private boolean isPromptString( Object o )
            {
                boolean value = false;
                if ( o instanceof String )
View Full Code Here

        return definition;
    }

    private static ArgumentsMatcher createArgumentMatcher()
    {
        return new AbstractMatcher()
        {
            protected boolean argumentMatches( Object o, Object o1 )
            {
                return !( o instanceof ArchetypeDefinition ) ||
                    compareArchetypeDefinition( (ArchetypeDefinition) o, (ArchetypeDefinition) o1 );
View Full Code Here

        null, new IllegalArgumentException());

    MockControl mockLog = MockControl.createControl(Log.class);
    Log log = (Log) mockLog.getMock();
    log.warn(null, rootCause);
    mockLog.setMatcher(new AbstractMatcher() {
      public boolean matches(Object[] expected, Object[] actual) {
        Assert.assertEquals(2, actual.length);
        Assert.assertTrue(actual[1] instanceof IllegalArgumentException);
        return true;
      }
View Full Code Here

TOP

Related Classes of org.easymock.AbstractMatcher

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.