From 96431a78324c9f08fc65a079a93cfcd23b2ab8b3 Mon Sep 17 00:00:00 2001 From: Mauricio Uyaguari Date: Fri, 10 May 2024 14:52:13 -0400 Subject: [PATCH] update identity input --- .../test/java/org/example/ShowcaseCompilerTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/showcases/src/test/java/org/example/ShowcaseCompilerTest.java b/showcases/src/test/java/org/example/ShowcaseCompilerTest.java index 125e59169..af2e7125e 100644 --- a/showcases/src/test/java/org/example/ShowcaseCompilerTest.java +++ b/showcases/src/test/java/org/example/ShowcaseCompilerTest.java @@ -18,7 +18,7 @@ import org.finos.legend.engine.protocol.pure.v1.model.test.result.TestResult; import org.finos.legend.engine.shared.core.api.grammar.RenderStyle; import org.finos.legend.engine.shared.core.deployment.DeploymentMode; -import org.finos.legend.engine.shared.core.identity.factory.IdentityFactoryProvider; +import org.finos.legend.engine.shared.core.identity.Identity; import org.finos.legend.engine.testable.TestableRunner; import org.finos.legend.engine.testable.extension.TestableRunnerExtensionLoader; import org.finos.legend.engine.testable.model.RunTestsResult; @@ -112,11 +112,12 @@ public void processShowcaseFile() throws IOException PureModelContextData pureModelContextData = PureGrammarParser.newInstance().parseModel(pureGrammar, "", 0, 0, true); PureGrammarComposer grammarComposer = PureGrammarComposer.newInstance(PureGrammarComposerContext.Builder.newInstance().withRenderStyle(RenderStyle.PRETTY).build()); - // compile - PureModel pureModel = Compiler.compile(pureModelContextData, DeploymentMode.PROD, IdentityFactoryProvider.getInstance().getAnonymousIdentity().getName()); - // Grammar composer adds a trailing newline - assertEquals(pureGrammar + "\n", grammarComposer.renderPureModelContextData(pureModelContextData)); + String composedPureGrammar = grammarComposer.renderPureModelContextData(pureModelContextData); + assertEquals(pureGrammar + "\n", composedPureGrammar); + + // compile + PureModel pureModel = Compiler.compile(pureModelContextData, DeploymentMode.PROD, Identity.getAnonymousIdentity().getName()); // run tests runAllTests(pureModel, pureModelContextData);