Package com.mockobjects.dynamic

Examples of com.mockobjects.dynamic.Mock.verify()


      monitor.serverSocketListening( name, serverSocket );
      monitor.serverSocketListening( name, serverSocket );
      monitor.errorAcceptingConnection( name, ioe );
      monitor.errorClosingServerSocket( name, ioe );

      mockLogger.verify();
   }

   public void testDNAAcceptorMonitorPassedNullIntoCtor()
      throws Exception
   {
View Full Code Here


        final ThreadPerRequestHandler requestHandler =
            new ThreadPerRequestHandler( handler, threadPool );
        requestHandler.handleConnection( new Socket() );

        mockHandler.verify();
        mockPool.verify();
        mockControl.verify();
    }

    public void testShutdownWhileThreadStillGoingButInteruptible()
        throws Exception
View Full Code Here

        final MockManagedRequestHandler managedHandler =
            new MockManagedRequestHandler( manager );
        managedHandler.handleConnection( socket );

        mockManager.verify();
        mockHandler.verify();
    }
}
View Full Code Here

      monitor.serverSocketListening( name, serverSocket );
      monitor.serverSocketListening( name, serverSocket );
      monitor.errorAcceptingConnection( name, ioe );
      monitor.errorClosingServerSocket( name, ioe );

      mockLogger.verify();
   }

   public void testAvalonAcceptorMonitorPassedNullIntoCtor()
      throws Exception
   {
View Full Code Here

        Map params = comp.createParametersForContext();
        assertNotNull(params);
        assertEquals(2, params.size());
        assertEquals("bar", ((String[])params.get("foo"))[0]);
        assertEquals(2, ((String[])params.get("baz")).length);
        mockValueStack.verify();
    }
}
View Full Code Here

        du.prepare(req, res);

        // then

        assertEquals(req.getCharacterEncoding(), "utf-8");
        mock.verify();
    }

    public void testPrepareSetEncodingPropertyWithMultipartRequest() throws Exception {
        MockHttpServletRequest req = new MockHttpServletRequest();
        MockHttpServletResponse res = new MockHttpServletResponse();
View Full Code Here

        du.setConfigurationManager(cm);
        assertFalse(destroyedObjectFactory.destroyed);
        du.cleanup();
        assertTrue(destroyedObjectFactory.destroyed);
        mockConfiguration.verify();
        mockContainer.verify();
    }
   
    public void testInterceptorDestroy() throws Exception {          
        Mock mockInterceptor = new Mock(Interceptor.class);
        mockInterceptor.matchAndReturn("hashCode", 0);
View Full Code Here

        dispatcher.setConfigurationManager(configurationManager);
        dispatcher.cleanup();
       
        mockInterceptor.verify();
        mockContainer.verify();
        mockConfiguration.verify();
    }
   
    class InternalConfigurationManager extends ConfigurationManager {
      public boolean destroyConfiguration = false;
     
View Full Code Here

        request.setupGetRequestDispatcher(dispatcher);
        tag.setPageContext(pageContext);
        tag.setTemplate("/test/checkbox.jsp");
        tag.doStartTag();
        tag.doEndTag();
        rdMock.verify();
    }
}
View Full Code Here

        RuntimeConfiguration configuration = config.getRuntimeConfiguration();

        // check that it has configuration from xml
        assertNotNull(configuration.getActionConfig("/foo/bar", "Bar"));

        mockContainerProvider.verify();
    }
   
    public void testInitForPackageProviders() {
       
        loadConfigurationProviders(new StubConfigurationProvider() {
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.