项目: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;
}
public TestSpringVaadinServletService(VaadinServlet servlet,WebApplicationContext applicationContext)
throws ServiceException {
super(servlet,new DefaultDeploymentConfiguration(TestSpringVaadinServletService.class,new Properties()),"");
this.appContext = applicationContext;
init();
}
public TestSpringVaadinServletService(VaadinServlet servlet,"");
this.appContext = applicationContext;
init();
}
项目:vaadin-vertx-samples
文件:VertxVaadin.java
项目:vaadin-vertx-samples
文件:VertxVaadinService.java
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。