Skip to content

Commit

Permalink
update identity input
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari committed May 10, 2024
1 parent ead90d9 commit 96431a7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions showcases/src/test/java/org/example/ShowcaseCompilerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 96431a7

Please sign in to comment.