微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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;
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。