use of org.finos.legend.sdlc.test.junit.LegendSDLCTestCaseCollector in project legend-sdlc by finos.
the class MappingTestCase method collectTestCases.
@LegendSDLCTestCaseCollector(collectorClass = Mapping.class)
public static void collectTestCases(PureModel pureModel, PureModelContextData pureModelContextData, MutableList<PlanTransformer> planTransformers, RichIterable<? extends Root_meta_pure_router_extension_RouterExtension> extensions, String pureVersion, Entity entity, Consumer<? super LegendSDLCTestCase> testCaseConsumer) {
Mapping mapping = findPackageableElement(pureModelContextData.getElementsOfType(Mapping.class), entity.getPath());
Optional.ofNullable(mapping.tests).orElse(Collections.emptyList()).stream().map(test -> new MappingTestCase(pureModel, pureModelContextData, mapping, test, planTransformers, extensions, pureVersion)).forEach(testCaseConsumer);
}
Aggregations