Skip to content

Commit

Permalink
Merge remote-tracking branch 'finos/master' into model-join
Browse files Browse the repository at this point in the history
  • Loading branch information
haroonsherjan committed Mar 14, 2024
2 parents 28d434a + 826a520 commit 7ab0939
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions showcases/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
<version>${legend.engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-shared-core</artifactId>
<version>${legend.engine.version}</version>
<scope>test</scope>
</dependency>
<!-- -->
<dependency>
<groupId>junit</groupId>
Expand Down
7 changes: 3 additions & 4 deletions showcases/src/test/java/org/example/ShowcaseCompilerTest.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.example;

import org.eclipse.collections.api.factory.Lists;
import org.eclipse.collections.api.factory.Sets;
import org.finos.legend.engine.language.pure.compiler.Compiler;
import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel;
import org.finos.legend.engine.language.pure.grammar.from.PureGrammarParser;
import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposer;
import org.finos.legend.engine.language.pure.grammar.to.PureGrammarComposerContext;
import org.finos.legend.engine.language.pure.modelManager.ModelManager;
import org.finos.legend.engine.protocol.pure.v1.ProtocolToClassifierPathLoader;
import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement;
Expand All @@ -20,6 +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.testable.TestableRunner;
import org.finos.legend.engine.testable.extension.TestableRunnerExtensionLoader;
import org.finos.legend.engine.testable.model.RunTestsResult;
Expand Down Expand Up @@ -114,13 +113,13 @@ public void processShowcaseFile() throws IOException
PureGrammarComposer grammarComposer = PureGrammarComposer.newInstance(PureGrammarComposerContext.Builder.newInstance().withRenderStyle(RenderStyle.PRETTY).build());

// compile
PureModel pureModel = Compiler.compile(pureModelContextData, DeploymentMode.PROD, Lists.mutable.empty());
PureModel pureModel = Compiler.compile(pureModelContextData, DeploymentMode.PROD, IdentityFactoryProvider.getInstance().getAnonymousIdentity().getName());

// Grammar composer adds a trailing newline
assertEquals(pureGrammar + "\n", grammarComposer.renderPureModelContextData(pureModelContextData));

// run tests
// runAllTests(pureModel, pureModelContextData);
runAllTests(pureModel, pureModelContextData);
}


Expand Down

0 comments on commit 7ab0939

Please sign in to comment.