use of com.haulmont.cuba.web.gui.WebComponentsFactory in project cuba by cuba-platform.
the class WebLookupFieldTest method initExpectations.
@Override
protected void initExpectations() {
super.initExpectations();
new NonStrictExpectations() {
{
vaadinSession.getLocale();
result = Locale.ENGLISH;
VaadinSession.getCurrent();
result = vaadinSession;
vaadinSession.getConverterFactory();
result = new DefaultConverterFactory();
globalConfig.getAvailableLocales();
result = ImmutableMap.of("en", Locale.ENGLISH);
AppContext.getProperty("cuba.mainMessagePack");
result = "com.haulmont.cuba.web";
}
};
factory = new WebComponentsFactory();
}
use of com.haulmont.cuba.web.gui.WebComponentsFactory in project cuba by cuba-platform.
the class WebOptionsListTest method initExpectations.
@Override
protected void initExpectations() {
super.initExpectations();
new NonStrictExpectations() {
{
vaadinSession.getLocale();
result = Locale.ENGLISH;
VaadinSession.getCurrent();
result = vaadinSession;
vaadinSession.getConverterFactory();
result = new DefaultConverterFactory();
globalConfig.getAvailableLocales();
result = ImmutableMap.of("en", Locale.ENGLISH);
AppContext.getProperty("cuba.mainMessagePack");
result = "com.haulmont.cuba.web";
}
};
factory = new WebComponentsFactory();
}
use of com.haulmont.cuba.web.gui.WebComponentsFactory in project cuba by cuba-platform.
the class WebTextFieldTest method initExpectations.
@Override
protected void initExpectations() {
super.initExpectations();
new NonStrictExpectations() {
{
vaadinSession.getLocale();
result = Locale.ENGLISH;
VaadinSession.getCurrent();
result = vaadinSession;
globalConfig.getAvailableLocales();
result = ImmutableMap.of("en", Locale.ENGLISH);
AppContext.getProperty("cuba.mainMessagePack");
result = "com.haulmont.cuba.web";
}
};
factory = new WebComponentsFactory();
}
use of com.haulmont.cuba.web.gui.WebComponentsFactory in project cuba by cuba-platform.
the class WebDateFieldTest method initExpectations.
@Override
protected void initExpectations() {
super.initExpectations();
new NonStrictExpectations() {
{
vaadinSession.getLocale();
result = Locale.ENGLISH;
VaadinSession.getCurrent();
result = vaadinSession;
globalConfig.getAvailableLocales();
result = ImmutableMap.of("en", Locale.ENGLISH);
AppContext.getProperty("cuba.mainMessagePack");
result = "com.haulmont.cuba.web";
}
};
factory = new WebComponentsFactory();
}
use of com.haulmont.cuba.web.gui.WebComponentsFactory in project cuba by cuba-platform.
the class WebFieldGroupTest method createComponentsFactory.
@Override
protected ComponentsFactory createComponentsFactory() {
return new WebComponentsFactory() {
@Override
public List<ComponentGenerationStrategy> getComponentGenerationStrategies() {
DefaultComponentGenerationStrategy strategy = new DefaultComponentGenerationStrategy(messages);
strategy.setComponentsFactory(this);
return Collections.singletonList(strategy);
}
};
}
Aggregations