use of org.everrest.core.impl.uri.UriBuilderImpl in project che by eclipse.
the class RecipeServiceTest method setUpUriInfo.
@BeforeMethod
public void setUpUriInfo() throws NoSuchFieldException, IllegalAccessException {
when(uriInfo.getBaseUriBuilder()).thenReturn(new UriBuilderImpl());
final Field uriField = service.getClass().getSuperclass().getDeclaredField("uriInfo");
uriField.setAccessible(true);
uriField.set(service, uriInfo);
}
use of org.everrest.core.impl.uri.UriBuilderImpl in project che by eclipse.
the class MachineServiceLinksInjectorTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
machineLinksInjector = new MachineLinksInjector();
final UriBuilder uriBuilder = new UriBuilderImpl();
uriBuilder.uri(URI_BASE);
when(serviceContextMock.getServiceUriBuilder()).thenReturn(uriBuilder);
when(serviceContextMock.getBaseUriBuilder()).thenReturn(uriBuilder);
}
use of org.everrest.core.impl.uri.UriBuilderImpl in project che by eclipse.
the class UserLinksInjectorTest method setUpContext.
@BeforeMethod
public void setUpContext() {
final UriBuilderImpl uriBuilder = new UriBuilderImpl();
uriBuilder.uri("http://localhost:8080");
when(serviceContext.getServiceUriBuilder()).thenReturn(uriBuilder);
when(serviceContext.getBaseUriBuilder()).thenReturn(uriBuilder);
}
use of org.everrest.core.impl.uri.UriBuilderImpl in project che by eclipse.
the class ProfileLinksInjectorTest method setUpContext.
@BeforeMethod
public void setUpContext() {
final UriBuilderImpl uriBuilder = new UriBuilderImpl();
uriBuilder.uri("http://localhost:8080");
when(serviceContext.getServiceUriBuilder()).thenReturn(uriBuilder);
when(serviceContext.getBaseUriBuilder()).thenReturn(uriBuilder);
}
use of org.everrest.core.impl.uri.UriBuilderImpl in project che by eclipse.
the class StackServiceTest method setUp.
@BeforeMethod
public void setUp() throws NoSuchFieldException, IllegalAccessException {
byte[] fileContent = STACK_ID.getBytes();
stackIcon = new StackIcon(ICON_MEDIA_TYPE, "image/svg+xml", fileContent);
componentsImpl = singletonList(new StackComponentImpl(COMPONENT_NAME, COMPONENT_VERSION));
stackSourceImpl = new StackSourceImpl(SOURCE_TYPE, SOURCE_ORIGIN);
CommandImpl command = new CommandImpl(COMMAND_NAME, COMMAND_LINE, COMMAND_TYPE);
EnvironmentImpl environment = new EnvironmentImpl(null, null);
WorkspaceConfigImpl workspaceConfig = WorkspaceConfigImpl.builder().setName(WORKSPACE_CONFIG_NAME).setDefaultEnv(DEF_ENVIRONMENT_NAME).setCommands(singletonList(command)).setEnvironments(singletonMap(ENVIRONMENT_NAME, environment)).build();
stackSourceDto = newDto(StackSourceDto.class).withType(SOURCE_TYPE).withOrigin(SOURCE_ORIGIN);
StackComponentDto stackComponentDto = newDto(StackComponentDto.class).withName(COMPONENT_NAME).withVersion(COMPONENT_VERSION);
componentsDto = singletonList(stackComponentDto);
stackDto = DtoFactory.getInstance().createDto(StackDto.class).withId(STACK_ID).withName(NAME).withDescription(DESCRIPTION).withScope(SCOPE).withCreator(CREATOR).withTags(tags).withSource(stackSourceDto).withComponents(componentsDto);
stackImpl = StackImpl.builder().setId(STACK_ID).setName(NAME).setDescription(DESCRIPTION).setScope(SCOPE).setCreator(CREATOR).setTags(tags).setSource(stackSourceImpl).setComponents(componentsImpl).setWorkspaceConfig(workspaceConfig).setStackIcon(stackIcon).build();
foreignStack = StackImpl.builder().setId(STACK_ID).setName(NAME).setDescription(DESCRIPTION).setScope(SCOPE).setCreator(FOREIGN_CREATOR).setTags(tags).setSource(stackSourceImpl).setComponents(componentsImpl).setWorkspaceConfig(workspaceConfig).setStackIcon(stackIcon).build();
when(uriInfo.getBaseUriBuilder()).thenReturn(new UriBuilderImpl());
final Field uriField = service.getClass().getSuperclass().getDeclaredField("uriInfo");
uriField.setAccessible(true);
uriField.set(service, uriInfo);
}
Aggregations