use of com.evolveum.midpoint.studio.impl.Environment in project midpoint-studio by Evolveum.
the class ClientBackgroundableTask method setupMidpointClient.
private MidPointClient setupMidpointClient() {
LOG.debug("Setting up MidPoint client");
Environment env = getEnvironment();
midPointService.printToConsole(env, getClass(), "Setting up midPoint client");
MidPointClient client = new MidPointClient(getProject(), env);
LOG.debug("MidPoint client setup done");
return client;
}
use of com.evolveum.midpoint.studio.impl.Environment in project midpoint-studio by Evolveum.
the class ExpanderTest method testExpandFile.
private void testExpandFile(String fileExpected, String fileToExpand, String... expandChunkFiles) {
for (String s : expandChunkFiles) {
myFixture.configureByFile(s);
}
PsiFile file = myFixture.configureByFile(fileToExpand);
Editor editor = myFixture.getEditor();
String text = editor.getDocument().getText();
Project project = getProject();
Environment environment = new Environment();
EnvironmentService es = EnvironmentService.getInstance(project);
es.add(environment);
EncryptionService cm = project != null ? EncryptionService.getInstance(project) : null;
Expander expander = new Expander(environment, cm, project);
String result = expander.expand(text, file.getVirtualFile());
LOG.info("Expanded result:\n" + result);
Diff d = DiffBuilder.compare(Input.fromFile(new File(getTestDataPath(), fileExpected))).withTest(Input.fromString(result)).build();
if (d.hasDifferences()) {
LOG.error(d.fullDescription());
fail();
}
}
Aggregations