use of com.vaadin.flow.di.Instantiator in project flow by vaadin.
the class I18NProviderInstantiationTest method getI18NProvider_i18nProviderIsABean_i18nProviderIsAvailable.
@Test
public void getI18NProvider_i18nProviderIsABean_i18nProviderIsAvailable() throws ServletException {
Instantiator instantiator = getInstantiator(context);
Assert.assertNotNull(instantiator.getI18NProvider());
Assert.assertEquals(DefaultI18NTestProvider.class, instantiator.getI18NProvider().getClass());
}
use of com.vaadin.flow.di.Instantiator in project flow by vaadin.
the class SpringInstantiatorTest method getI18NProvider_i18nProviderIsABean_i18nProviderIsAvailable.
@Test
public void getI18NProvider_i18nProviderIsABean_i18nProviderIsAvailable() throws ServletException {
Instantiator instantiator = getInstantiator(context);
Assert.assertNotNull(instantiator.getI18NProvider());
Assert.assertEquals(I18NTestProvider.class, instantiator.getI18NProvider().getClass());
}
use of com.vaadin.flow.di.Instantiator in project flow by vaadin.
the class SpringInstantiatorTest method getServiceInitListeners_springManagedBeanAndJavaSPI_bothClassesAreInStream.
@Test
public void getServiceInitListeners_springManagedBeanAndJavaSPI_bothClassesAreInStream() throws ServletException {
Instantiator instantiator = getInstantiator(context);
Set<?> set = instantiator.getServiceInitListeners().map(Object::getClass).collect(Collectors.toSet());
Assert.assertTrue(set.contains(TestVaadinServiceInitListener.class));
Assert.assertTrue(set.contains(JavaSPIVaadinServiceInitListener.class));
}
use of com.vaadin.flow.di.Instantiator in project flow by vaadin.
the class SpringInstantiatorTest method createRouteTarget_pojo_instanceIsCreated.
@Test
public void createRouteTarget_pojo_instanceIsCreated() throws ServletException {
Instantiator instantiator = getInstantiator(context);
RouteTarget1 target1 = instantiator.createRouteTarget(RouteTarget1.class, null);
Assert.assertNotNull(target1);
}
use of com.vaadin.flow.di.Instantiator in project flow by vaadin.
the class SpringVaadinServletServiceTest method getInstantiator_javaSPIClass_instantiatorPojoReturned.
@Test
public void getInstantiator_javaSPIClass_instantiatorPojoReturned() throws ServletException {
Properties properties = new Properties();
properties.setProperty(FOO, Boolean.FALSE.toString());
VaadinService service = SpringInstantiatorTest.getService(context, properties);
Instantiator instantiator = service.getInstantiator();
Assert.assertEquals(JavaSPIInstantiator.class, instantiator.getClass());
}
Aggregations