Package org.easymock

Examples of org.easymock.MockControl.verify()


      assertEquals("<Matching value>", expected, actual);

      // verify the expectations were met.
      firstValueControl.verify();
      secondValueControl.verify();

      // reset mock controls.
      firstValueControl.reset();
      secondValueControl.reset();
    }
View Full Code Here


    // run scenario
    BrokerFactoryBean factory = new BrokerFactoryBean();
    factory.setDataSource(ds);
    factory.afterPropertiesSet();

    dsControl.verify();
  }

  public void testBrokerFactoryWithConfigNotFound() {
    MockControl dsControl = MockControl.createControl(DataSource.class);
    BrokerFactoryBean factory = new BrokerFactoryBean();
View Full Code Here

    });

    assertEquals("result should be [done]", "done", result);

    dsControl.verify();
    conControl.verify();
  }

  public void testBrokerDaoSupport() throws Exception {
    // prepare mock objects
    MockControl dsControl = MockControl.createControl(DataSource.class);
View Full Code Here

    };
    testDao.setBrokerTemplate(template);
    assertEquals(template, testDao.getBrokerTemplate());

    testDao.afterPropertiesSet();
    dsControl.verify();
  }

  /**
   * This method may be updated when upgrading ORBroker to a newer version.
   * ORBroker does not use interfaces, and its main classes are final with a package scope visibility!!!
View Full Code Here

    configuration.afterPropertiesSet();
    JbpmConfiguration cfg = (JbpmConfiguration) configuration.getObject();

    assertSame(context, cfg.createJbpmContext());

    beanFactoryControl.verify();
    factoryControl.verify();
  }

  public void testNoSpringObjectFactory() throws Exception {
    // configuration.setUseSpringObjectFactory(false);
View Full Code Here

    configuration.setSessionFactory(sf);
    configuration.afterPropertiesSet();

    sfCtrl.verify();
    sCtrl.verify();
    queryCtrl.verify();
  }

  public void testBeanFactoryRelease() throws Exception {
    BeanFactory beanFactory = new DefaultListableBeanFactory();
   
View Full Code Here

        } catch (Throwable t) {
            fail("Should not have thrown Throwable: " + t);
        }

        sfControl.verify();
        sessionControl.verify();
    }

    public void testInterceptorWithPrebound() {
        MockControl sfControl = MockControl.createControl(SessionFactory.class);
        SessionFactory sf = (SessionFactory) sfControl.getMock();
View Full Code Here

    Object actual = cacheProviderFacade
        .makeSerializableIfNecessary(objectToStore);
    assertSame(expected, actual);

    cacheProviderFacadeControl.verify();
    factoryControl.verify();
  }

  public void testMakeSerializableIfNecessaryWhenSerializableIsRequiredAndSerializableFactoryIsNotNullAndEntryIsSerializable() {
    cacheProviderFacadeControl.expectAndReturn(cacheProviderFacade
        .isSerializableCacheElementRequired(), true);
View Full Code Here

       
        assertSame(xaSession, holder.getSession());
       
        xaSessionControl.verify();
        sessionControl.verify();
        xaResCtrl.verify();
        sfCtrl.verify();
    }
}
View Full Code Here

        interceptor.preHandle(request, response, "handler");
        interceptor.postHandle(request, response, "handler", null);
        interceptor.afterCompletion(request, response, "handler", null);

        sfControl.verify();
        sessionControl.verify();

        sfControl.reset();
        sessionControl.reset();
        sfControl.replay();
        sessionControl.replay();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.