use of org.activiti.rest.util.TestServerUtil.TestServer in project Activiti by Activiti.
the class SerializableVariablesDiabledTest method setupServer.
@Before
public void setupServer() {
if (serverUrlPrefix == null) {
TestServer testServer = TestServerUtil.createAndStartServer(ObjectVariableSerializationDisabledApplicationConfiguration.class);
serverUrlPrefix = testServer.getServerUrlPrefix();
this.repositoryService = testServer.getApplicationContext().getBean(RepositoryService.class);
this.runtimeService = testServer.getApplicationContext().getBean(RuntimeService.class);
this.identityService = testServer.getApplicationContext().getBean(IdentityService.class);
this.taskService = testServer.getApplicationContext().getBean(TaskService.class);
User user = identityService.newUser("kermit");
user.setFirstName("Kermit");
user.setLastName("the Frog");
user.setPassword("kermit");
identityService.saveUser(user);
Group group = identityService.newGroup("admin");
group.setName("Administrators");
identityService.saveGroup(group);
identityService.createMembership(user.getId(), group.getId());
this.testUserId = user.getId();
this.testGroupId = group.getId();
}
}
Aggregations