use of com.b2international.snowowl.core.identity.IdentityWriter in project snow-owl by b2ihealthcare.
the class SnowOwlAppRule method before.
@Override
protected void before() throws Throwable {
super.before();
snowowl = SnowOwl.create(this.plugins);
if (clearResources) {
final File resourceDirectory = snowowl.getEnviroment().getDataPath().toFile();
FileUtils.cleanDirectory(resourceDirectory);
}
snowowl.bootstrap();
snowowl.run();
// inject the test user to the current identity provider
try {
((IdentityWriter) ApplicationContext.getInstance().getServiceChecked(IdentityProvider.class)).addUser(RestExtensions.USER, RestExtensions.PASS);
} catch (AlreadyExistsException e) {
// ignore existing user
}
}
Aggregations