use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class AggregateOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(AggregateOperatorsTest.class.getResourceAsStream("../OperatorTests/AggregateOperators.cql"), modelManager, new LibraryManager(modelManager));
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
if (library.getStatements() != null) {
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
}
use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class ArithmeticOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(ArithmeticOperatorsTest.class.getResourceAsStream("../OperatorTests/ArithmeticOperators.cql"), modelManager, new LibraryManager(modelManager));
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class EscapeSequenceTests method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
LibraryManager libraryManager = new LibraryManager(modelManager);
CqlTranslator translator = CqlTranslator.fromStream(org.cqframework.cql.cql2elm.EscapeSequenceTests.class.getResourceAsStream("EscapeSequenceTests.cql"), modelManager, libraryManager);
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class TypeOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(TypeOperatorsTest.class.getResourceAsStream("../OperatorTests/TypeOperators.cql"), modelManager, new LibraryManager(modelManager));
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class EscapeSequenceWithBacktickTests method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
LibraryManager libraryManager = new LibraryManager(modelManager);
CqlTranslator translator = CqlTranslator.fromStream(org.cqframework.cql.cql2elm.EscapeSequenceTests.class.getResourceAsStream("EscapeSequenceWithBacktickTests.cql"), modelManager, libraryManager);
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
Aggregations