com.vaadin.server.DefaultDeploymentConfiguration的实例源码

项目:holon-vaadin    文件AbstractVaadinTest.java   
/**
 * Create a VaadinSession
 * @param locale Client locale
 * @return VaadinSession instance
 * @throws Exception Failed to create session
 */
protected VaadinSession createVaadinSession(Locale locale) throws Exception {
    WrappedSession wrappedSession = mock(WrappedSession.class);
    VaadinServletService vaadinService = mock(VaadinServletService.class);
    when(vaadinService.getDeploymentConfiguration())
            .thenReturn(new DefaultDeploymentConfiguration(VaadinServletService.class,getDeploymentProperties()));

    VaadinSession session = mock(VaadinSession.class);
    when(session.getState()).thenReturn(VaadinSession.State.OPEN);
    when(session.getSession()).thenReturn(wrappedSession);
    when(session.getService()).thenReturn(vaadinService);
    when(session.getSession().getId()).thenReturn(TEST_SESSION_ID);
    when(session.hasLock()).thenReturn(true);
    when(session.getLocale()).thenReturn(locale != null ? locale : Locale.US);
    return session;
}
项目:holon-vaadin7    文件AbstractVaadinTest.java   
/**
 * Create a VaadinSession
 * @param locale Client locale
 * @return VaadinSession instance
 * @throws Exception Failed to create session
 */
protected VaadinSession createVaadinSession(Locale locale) throws Exception {
    WrappedSession wrappedSession = mock(WrappedSession.class);
    VaadinServletService vaadinService = mock(VaadinServletService.class);
    when(vaadinService.getDeploymentConfiguration())
            .thenReturn(new DefaultDeploymentConfiguration(VaadinServletService.class,getDeploymentProperties()));

    VaadinSession session = mock(VaadinSession.class);
    when(session.getState()).thenReturn(VaadinSession.State.OPEN);
    when(session.getSession()).thenReturn(wrappedSession);
    when(session.getService()).thenReturn(vaadinService);
    when(session.getSession().getId()).thenReturn(TEST_SESSION_ID);
    when(session.hasLock()).thenReturn(true);
    when(session.getLocale()).thenReturn(locale != null ? locale : Locale.US);
    return session;
}
项目:holon-vaadin7    文件AbstractVaadinspringTest.java   
public TestSpringVaadinServletService(VaadinServlet servlet,WebApplicationContext applicationContext)
        throws ServiceException {
    super(servlet,new DefaultDeploymentConfiguration(TestSpringVaadinServletService.class,new Properties()),"");
    this.appContext = applicationContext;
    init();
}
项目:holon-vaadin    文件AbstractVaadinspringTest.java   
public TestSpringVaadinServletService(VaadinServlet servlet,"");
    this.appContext = applicationContext;
    init();
}
项目:vaadin-vertx-samples    文件VertxVaadin.java   
private DefaultDeploymentConfiguration createDeploymentConfiguration() {
    return new DefaultDeploymentConfiguration(getClass(),initProperties());
}
项目:vaadin-vertx-samples    文件VertxVaadinService.java   
public VertxVaadinService(VertxVaadin vertxVaadin,DefaultDeploymentConfiguration deploymentConfiguration) {
    super(deploymentConfiguration);
    this.vertxVaadin = vertxVaadin;
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...