Package com.calclab.suco.testing.ioc

Examples of com.calclab.suco.testing.ioc.MockContainer.create()


     * service when we call the getMessage method on the component
     */
    @Test
    public void componentShouldCallServiceWhenGetMessage() {
  final MockContainer container = new MockContainer();
  final Component component = container.create(Component.class);
  final Service mockedService = container.getInstance(Service.class);
  // perform the call
  component.getMessage();
  // verify that component called the getMessage method on the mock
  // see mockito (mockito.googlecode.com) for more info about how mockito
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.