use of org.eclipse.che.api.factory.server.builder.FactoryBuilder in project che by eclipse.
the class FactoryServiceTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
factoryBuilderSpy = spy(new FactoryBuilder(new SourceStorageParametersValidator()));
factoryParametersResolvers = new HashSet<>();
doNothing().when(factoryBuilderSpy).checkValid(any(FactoryDto.class));
doNothing().when(factoryBuilderSpy).checkValid(any(FactoryDto.class), anyBoolean());
when(factoryParametersResolverHolder.getFactoryParametersResolvers()).thenReturn(factoryParametersResolvers);
user = new UserImpl(USER_ID, USER_EMAIL, ADMIN_USER_NAME);
when(userManager.getById(anyString())).thenReturn(user);
when(preferenceManager.find(USER_ID)).thenReturn(ImmutableMap.of("preference", "value"));
service = new FactoryService(factoryManager, userManager, preferenceManager, createValidator, acceptValidator, editValidator, factoryBuilderSpy, workspaceManager, factoryParametersResolverHolder);
}
Aggregations