use of com.vaadin.flow.server.MockVaadinContext in project flow by vaadin.
the class RouteConfigurationTest method mockRegistry.
private RouteRegistry mockRegistry() {
RouteRegistry registry = Mockito.mock(RouteRegistry.class);
VaadinContext context = new MockVaadinContext();
Mockito.when(registry.getContext()).thenReturn(context);
return registry;
}
use of com.vaadin.flow.server.MockVaadinContext in project flow by vaadin.
the class TaskGenerateFeatureFlagsTest method setUp.
@Before
public void setUp() throws Exception {
VaadinContext context = new MockVaadinContext();
ApplicationConfiguration configuration = Mockito.mock(ApplicationConfiguration.class);
context.setAttribute(ApplicationConfiguration.class, configuration);
File frontendFolder = temporaryFolder.newFolder(FRONTEND);
featureFlags = FeatureFlags.get(context);
taskGenerateFeatureFlags = new TaskGenerateFeatureFlags(frontendFolder, featureFlags);
}
Aggregations