Add ability to create test workspaces for the non-default user (#6318)
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>6.19.x
parent
f1d2a2c647
commit
e462678fb0
|
|
@ -30,6 +30,10 @@
|
|||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.inject.extensions</groupId>
|
||||
<artifactId>guice-assistedinject</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.RUNNING;
|
|||
import static org.eclipse.che.api.core.model.workspace.WorkspaceStatus.STOPPED;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.google.inject.assistedinject.AssistedInject;
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
|
@ -32,6 +33,7 @@ import org.eclipse.che.api.workspace.shared.dto.WorkspaceConfigDto;
|
|||
import org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
|
||||
import org.eclipse.che.dto.server.DtoFactory;
|
||||
import org.eclipse.che.selenium.core.provider.TestApiEndpointUrlProvider;
|
||||
import org.eclipse.che.selenium.core.requestfactory.TestUserHttpJsonRequestFactoryCreator;
|
||||
import org.eclipse.che.selenium.core.user.TestUser;
|
||||
import org.eclipse.che.selenium.core.user.TestUserNamespaceResolver;
|
||||
import org.eclipse.che.selenium.core.utils.WaitUtils;
|
||||
|
|
@ -39,24 +41,38 @@ import org.eclipse.che.selenium.core.workspace.MemoryMeasure;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/** @author Musienko Maxim */
|
||||
@Singleton
|
||||
/**
|
||||
* @author Musienko Maxim
|
||||
* @author Dmytro Nochevnov
|
||||
*/
|
||||
public class TestWorkspaceServiceClient {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TestWorkspaceServiceClient.class);
|
||||
|
||||
private final TestApiEndpointUrlProvider apiEndpointProvider;
|
||||
private final HttpJsonRequestFactory requestFactory;
|
||||
private final TestUserNamespaceResolver testUserNamespaceResolver;
|
||||
private final TestUserNamespaceResolver userNamespaceResolver;
|
||||
|
||||
@Inject
|
||||
public TestWorkspaceServiceClient(
|
||||
TestApiEndpointUrlProvider apiEndpointProvider,
|
||||
HttpJsonRequestFactory requestFactory,
|
||||
TestUserNamespaceResolver testUserNamespaceResolver) {
|
||||
TestUserNamespaceResolver userNamespaceResolver) {
|
||||
this.apiEndpointProvider = apiEndpointProvider;
|
||||
this.requestFactory = requestFactory;
|
||||
this.testUserNamespaceResolver = testUserNamespaceResolver;
|
||||
this.userNamespaceResolver = userNamespaceResolver;
|
||||
}
|
||||
|
||||
@AssistedInject
|
||||
public TestWorkspaceServiceClient(
|
||||
TestApiEndpointUrlProvider apiEndpointProvider,
|
||||
TestUserNamespaceResolver userNamespaceResolver,
|
||||
TestUserHttpJsonRequestFactoryCreator userHttpJsonRequestFactoryCreator,
|
||||
@Assisted String authToken) {
|
||||
this(
|
||||
apiEndpointProvider,
|
||||
userHttpJsonRequestFactoryCreator.create(authToken),
|
||||
userNamespaceResolver);
|
||||
}
|
||||
|
||||
private String getBaseUrl() {
|
||||
|
|
@ -258,7 +274,7 @@ public class TestWorkspaceServiceClient {
|
|||
}
|
||||
|
||||
private String getNameBasedUrl(String workspaceName, String username) {
|
||||
return getBaseUrl() + "/" + testUserNamespaceResolver.resolve(username) + "/" + workspaceName;
|
||||
return getBaseUrl() + "/" + userNamespaceResolver.resolve(username) + "/" + workspaceName;
|
||||
}
|
||||
|
||||
private String getIdBasedUrl(String workspaceId) {
|
||||
|
|
@ -288,8 +304,6 @@ public class TestWorkspaceServiceClient {
|
|||
* Delete workspaces which could be created from factory
|
||||
*
|
||||
* @param originalName name workspace which was used to create factory
|
||||
* @param username
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFactoryWorkspaces(String originalName, String username) throws Exception {
|
||||
String workspace2delete = originalName;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 Red Hat, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat, Inc. - initial API and implementation
|
||||
*/
|
||||
package org.eclipse.che.selenium.core.client;
|
||||
|
||||
/** @author Dmytro Nochevnov */
|
||||
public interface TestWorkspaceServiceClientFactory {
|
||||
TestWorkspaceServiceClient create(String authToken);
|
||||
}
|
||||
|
|
@ -10,15 +10,17 @@
|
|||
*/
|
||||
package org.eclipse.che.selenium.core.requestfactory;
|
||||
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import java.util.Objects;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** @author Dmytro Nochevnov */
|
||||
public class TestUserHttpJsonRequestFactory extends TestHttpJsonRequestFactory {
|
||||
|
||||
private final String authToken;
|
||||
|
||||
public TestUserHttpJsonRequestFactory(@NotNull String authToken) {
|
||||
@Inject
|
||||
public TestUserHttpJsonRequestFactory(@Assisted String authToken) {
|
||||
Objects.requireNonNull(authToken);
|
||||
this.authToken = authToken;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 Red Hat, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat, Inc. - initial API and implementation
|
||||
*/
|
||||
package org.eclipse.che.selenium.core.requestfactory;
|
||||
|
||||
/** @author Dmytro Nochevnov */
|
||||
public interface TestUserHttpJsonRequestFactoryCreator {
|
||||
TestUserHttpJsonRequestFactory create(String authToken);
|
||||
}
|
||||
|
|
@ -12,17 +12,15 @@ package org.eclipse.che.selenium.core.user;
|
|||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import org.eclipse.che.selenium.core.client.TestAuthServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestUserServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClient;
|
||||
|
||||
/**
|
||||
* Default {@link TestUser} that will be created before all tests and will be deleted after them.
|
||||
* All tests share the same default user.
|
||||
*
|
||||
* <p>To have move users per tests see {@link InjectTestUser}.
|
||||
* <p>To have more users per tests see {@link InjectTestUser}.
|
||||
*
|
||||
* @author Anatolii Bazko
|
||||
* @author Dmytro Nochevnov
|
||||
*/
|
||||
@Singleton
|
||||
public class DefaultTestUser implements TestUser {
|
||||
|
|
@ -30,13 +28,8 @@ public class DefaultTestUser implements TestUser {
|
|||
private final TestUser testUser;
|
||||
|
||||
@Inject
|
||||
public DefaultTestUser(
|
||||
TestUserServiceClient testUserServiceClient,
|
||||
TestWorkspaceServiceClient workspaceServiceClient,
|
||||
TestAuthServiceClient authServiceClient)
|
||||
throws Exception {
|
||||
this.testUser =
|
||||
new TestUserImpl(testUserServiceClient, workspaceServiceClient, authServiceClient);
|
||||
public DefaultTestUser(TestUser testUser) throws Exception {
|
||||
this.testUser = testUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 Red Hat, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat, Inc. - initial API and implementation
|
||||
*/
|
||||
package org.eclipse.che.selenium.core.user;
|
||||
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
|
||||
/**
|
||||
* @author Anton Korneta
|
||||
* @author Dmytro Nochevnov
|
||||
*/
|
||||
public interface TestUserFactory {
|
||||
TestUser create(@Assisted("email") String email);
|
||||
|
||||
TestUser create(@Assisted("email") String email, @Assisted("password") String password);
|
||||
}
|
||||
|
|
@ -13,6 +13,8 @@ package org.eclipse.che.selenium.core.user;
|
|||
import static java.lang.String.format;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.google.inject.assistedinject.AssistedInject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
|
@ -20,11 +22,17 @@ import org.eclipse.che.commons.lang.NameGenerator;
|
|||
import org.eclipse.che.selenium.core.client.TestAuthServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestUserServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClientFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/** @author Anatolii Bazko */
|
||||
/**
|
||||
* @author Anatolii Bazko
|
||||
* @author Dmytro Nochevnov
|
||||
* @author Anton Korneta
|
||||
*/
|
||||
public class TestUserImpl implements TestUser {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TestUserImpl.class);
|
||||
|
||||
private final String email;
|
||||
|
|
@ -36,31 +44,34 @@ public class TestUserImpl implements TestUser {
|
|||
private final TestUserServiceClient userServiceClient;
|
||||
private final TestWorkspaceServiceClient workspaceServiceClient;
|
||||
|
||||
/** To instantiate user with generated email and password. */
|
||||
@Inject
|
||||
public TestUserImpl(
|
||||
TestUserServiceClient userServiceClient,
|
||||
TestWorkspaceServiceClient workspaceServiceClient,
|
||||
TestAuthServiceClient authServiceClient)
|
||||
TestAuthServiceClient authServiceClient,
|
||||
TestWorkspaceServiceClientFactory workspaceServiceClientFactory)
|
||||
throws Exception {
|
||||
this(
|
||||
NameGenerator.generate("user", 6) + "@some.mail",
|
||||
userServiceClient,
|
||||
workspaceServiceClient,
|
||||
authServiceClient);
|
||||
authServiceClient,
|
||||
workspaceServiceClientFactory,
|
||||
NameGenerator.generate("user", 6) + "@some.mail",
|
||||
NameGenerator.generate("Pwd1", 6));
|
||||
}
|
||||
|
||||
/** To instantiate user with specific e-mail. */
|
||||
/** To instantiate user with specific e-mail and password. */
|
||||
@AssistedInject
|
||||
public TestUserImpl(
|
||||
String email,
|
||||
TestUserServiceClient userServiceClient,
|
||||
TestWorkspaceServiceClient workspaceServiceClient,
|
||||
TestAuthServiceClient authServiceClient)
|
||||
TestAuthServiceClient authServiceClient,
|
||||
TestWorkspaceServiceClientFactory workspaceServiceClientFactory,
|
||||
@Assisted("email") String email,
|
||||
@Assisted("password") String password)
|
||||
throws Exception {
|
||||
this.userServiceClient = userServiceClient;
|
||||
this.workspaceServiceClient = workspaceServiceClient;
|
||||
|
||||
this.email = email;
|
||||
this.password = NameGenerator.generate("Pwd1", 6);
|
||||
this.password = password;
|
||||
this.name = email.split("@")[0];
|
||||
|
||||
this.id = userServiceClient.create(email, password).getId();
|
||||
|
|
@ -68,6 +79,23 @@ public class TestUserImpl implements TestUser {
|
|||
LOG.info("User name='{}', password '{}', id='{}' has been created", name, password, id);
|
||||
|
||||
this.authToken = authServiceClient.login(getName(), getPassword());
|
||||
this.workspaceServiceClient = workspaceServiceClientFactory.create(authToken);
|
||||
}
|
||||
|
||||
/** To instantiate user with password. */
|
||||
@AssistedInject
|
||||
public TestUserImpl(
|
||||
TestUserServiceClient userServiceClient,
|
||||
TestAuthServiceClient authServiceClient,
|
||||
TestWorkspaceServiceClientFactory workspaceServiceClientFactory,
|
||||
@Assisted("email") String email)
|
||||
throws Exception {
|
||||
this(
|
||||
userServiceClient,
|
||||
authServiceClient,
|
||||
workspaceServiceClientFactory,
|
||||
email,
|
||||
NameGenerator.generate("Pwd1", 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@ import com.google.inject.Injector;
|
|||
import com.google.inject.MembersInjector;
|
||||
import com.google.inject.Provider;
|
||||
import java.lang.reflect.Field;
|
||||
import org.eclipse.che.selenium.core.client.TestAuthServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestUserServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClient;
|
||||
|
||||
/**
|
||||
* Injector for custom annotation {@link InjectTestUser}.
|
||||
|
|
@ -39,13 +36,7 @@ public class TestUserInjector<T> implements MembersInjector<T> {
|
|||
public void injectMembers(T t) {
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
field.set(
|
||||
t,
|
||||
new TestUserImpl(
|
||||
injectTestUser.value(),
|
||||
injector.getInstance(TestUserServiceClient.class),
|
||||
injector.getInstance(TestWorkspaceServiceClient.class),
|
||||
injector.getInstance(TestAuthServiceClient.class)));
|
||||
field.set(t, injector.getInstance(TestUserFactory.class).create(injectTestUser.value()));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to instantiate user in " + t.getClass().getName(), e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ public class TestWorkspaceImpl implements TestWorkspace {
|
|||
TestUser owner,
|
||||
int memoryInGB,
|
||||
String template,
|
||||
TestWorkspaceServiceClient workspaceServiceClient) {
|
||||
TestWorkspaceServiceClient testWorkspaceServiceClient) {
|
||||
this.name = name;
|
||||
this.owner = owner;
|
||||
this.id = new AtomicReference<>();
|
||||
this.workspaceServiceClient = workspaceServiceClient;
|
||||
this.workspaceServiceClient = testWorkspaceServiceClient;
|
||||
|
||||
this.future =
|
||||
CompletableFuture.runAsync(
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import org.eclipse.che.api.core.model.workspace.WorkspaceStatus;
|
|||
import org.eclipse.che.commons.lang.NameGenerator;
|
||||
import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClientFactory;
|
||||
import org.eclipse.che.selenium.core.configuration.ConfigurationException;
|
||||
import org.eclipse.che.selenium.core.user.DefaultTestUser;
|
||||
import org.eclipse.che.selenium.core.user.TestUser;
|
||||
|
|
@ -45,17 +46,20 @@ public class TestWorkspaceProviderImpl implements TestWorkspaceProvider {
|
|||
private final ScheduledExecutorService executor;
|
||||
private final DefaultTestUser defaultUser;
|
||||
private final int defaultMemoryGb;
|
||||
private final TestWorkspaceServiceClient workspaceServiceClient;
|
||||
private final TestWorkspaceServiceClient testWorkspaceServiceClient;
|
||||
private final TestWorkspaceServiceClientFactory testWorkspaceServiceClientFactory;
|
||||
|
||||
@Inject
|
||||
public TestWorkspaceProviderImpl(
|
||||
@Named("sys.threads") int threads,
|
||||
@Named("workspace.default_memory_gb") int defaultMemoryGb,
|
||||
DefaultTestUser defaultUser,
|
||||
TestWorkspaceServiceClient workspaceServiceClient) {
|
||||
TestWorkspaceServiceClient testWorkspaceServiceClient,
|
||||
TestWorkspaceServiceClientFactory testWorkspaceServiceClientFactory) {
|
||||
this.defaultUser = defaultUser;
|
||||
this.defaultMemoryGb = defaultMemoryGb;
|
||||
this.workspaceServiceClient = workspaceServiceClient;
|
||||
this.testWorkspaceServiceClient = testWorkspaceServiceClient;
|
||||
this.testWorkspaceServiceClientFactory = testWorkspaceServiceClientFactory;
|
||||
|
||||
if (threads == 0) {
|
||||
throw new ConfigurationException("Threads number is 0");
|
||||
|
|
@ -80,7 +84,12 @@ public class TestWorkspaceProviderImpl implements TestWorkspaceProvider {
|
|||
return doGetWorkspaceFromPool();
|
||||
}
|
||||
|
||||
return new TestWorkspaceImpl(generateName(), owner, memoryGB, template, workspaceServiceClient);
|
||||
return new TestWorkspaceImpl(
|
||||
generateName(),
|
||||
owner,
|
||||
memoryGB,
|
||||
template,
|
||||
testWorkspaceServiceClientFactory.create(owner.getAuthToken()));
|
||||
}
|
||||
|
||||
private boolean hasDefaultValues(TestUser testUser, int memoryGB, String template) {
|
||||
|
|
@ -94,10 +103,10 @@ public class TestWorkspaceProviderImpl implements TestWorkspaceProvider {
|
|||
// insure workspace is running
|
||||
TestWorkspace testWorkspace = testWorkspaceQueue.take();
|
||||
WorkspaceStatus testWorkspaceStatus =
|
||||
workspaceServiceClient.getById(testWorkspace.getId()).getStatus();
|
||||
testWorkspaceServiceClient.getById(testWorkspace.getId()).getStatus();
|
||||
|
||||
if (testWorkspaceStatus != WorkspaceStatus.RUNNING) {
|
||||
workspaceServiceClient.start(
|
||||
testWorkspaceServiceClient.start(
|
||||
testWorkspace.getId(), testWorkspace.getName(), testWorkspace.getOwner());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.inject.extensions</groupId>
|
||||
<artifactId>guice-assistedinject</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import static org.eclipse.che.selenium.core.utils.PlatformUtils.isMac;
|
|||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Provides;
|
||||
import com.google.inject.assistedinject.FactoryModuleBuilder;
|
||||
import com.google.inject.name.Names;
|
||||
import javax.inject.Named;
|
||||
import org.eclipse.che.api.core.rest.HttpJsonRequestFactory;
|
||||
|
|
@ -25,6 +26,7 @@ import org.eclipse.che.selenium.core.client.CheTestAuthServiceClient;
|
|||
import org.eclipse.che.selenium.core.client.CheTestMachineServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestAuthServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestMachineServiceClient;
|
||||
import org.eclipse.che.selenium.core.client.TestWorkspaceServiceClientFactory;
|
||||
import org.eclipse.che.selenium.core.configuration.SeleniumTestConfiguration;
|
||||
import org.eclipse.che.selenium.core.configuration.TestConfiguration;
|
||||
import org.eclipse.che.selenium.core.provider.CheTestApiEndpointUrlProvider;
|
||||
|
|
@ -42,11 +44,13 @@ import org.eclipse.che.selenium.core.provider.TestSvnRepo1Provider;
|
|||
import org.eclipse.che.selenium.core.provider.TestSvnRepo2Provider;
|
||||
import org.eclipse.che.selenium.core.provider.TestSvnUsernameProvider;
|
||||
import org.eclipse.che.selenium.core.requestfactory.TestDefaultUserHttpJsonRequestFactory;
|
||||
import org.eclipse.che.selenium.core.requestfactory.TestUserHttpJsonRequestFactoryCreator;
|
||||
import org.eclipse.che.selenium.core.user.AdminTestUser;
|
||||
import org.eclipse.che.selenium.core.user.CheAdminTestUser;
|
||||
import org.eclipse.che.selenium.core.user.CheTestUserNamespaceResolver;
|
||||
import org.eclipse.che.selenium.core.user.DefaultTestUser;
|
||||
import org.eclipse.che.selenium.core.user.TestUser;
|
||||
import org.eclipse.che.selenium.core.user.TestUserFactory;
|
||||
import org.eclipse.che.selenium.core.user.TestUserImpl;
|
||||
import org.eclipse.che.selenium.core.user.TestUserNamespaceResolver;
|
||||
import org.eclipse.che.selenium.core.workspace.CheTestWorkspaceUrlResolver;
|
||||
|
|
@ -81,14 +85,22 @@ public class CheSeleniumSuiteModule extends AbstractModule {
|
|||
bind(TestDashboardUrlProvider.class).to(CheTestDashboardUrlProvider.class);
|
||||
|
||||
bind(HttpJsonRequestFactory.class).to(TestDefaultUserHttpJsonRequestFactory.class);
|
||||
|
||||
bind(AdminTestUser.class).to(CheAdminTestUser.class);
|
||||
install(new FactoryModuleBuilder().build(TestUserHttpJsonRequestFactoryCreator.class));
|
||||
|
||||
bind(TestAuthServiceClient.class).to(CheTestAuthServiceClient.class);
|
||||
bind(TestMachineServiceClient.class).to(CheTestMachineServiceClient.class);
|
||||
|
||||
bind(TestUser.class).to(TestUserImpl.class);
|
||||
bind(TestWorkspaceProvider.class).to(TestWorkspaceProviderImpl.class).asEagerSingleton();
|
||||
|
||||
install(new FactoryModuleBuilder().build(TestWorkspaceServiceClientFactory.class));
|
||||
|
||||
install(
|
||||
new FactoryModuleBuilder()
|
||||
.implement(TestUser.class, TestUserImpl.class)
|
||||
.build(TestUserFactory.class));
|
||||
|
||||
bind(AdminTestUser.class).to(CheAdminTestUser.class);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
|
|||
Loading…
Reference in New Issue