use of com.serotonin.m2m2.module.ModuleElementDefinition in project ma-core-public by infiniteautomation.
the class MangoTestBase method staticSetup.
@BeforeClass
public static void staticSetup() throws IOException {
// Configure Log4j2
ConfigurationSource source = new ConfigurationSource(MangoTestBase.class.getClass().getResource("/test-log4j2.xml").openStream());
Configurator.initialize(null, source);
List<ModuleElementDefinition> definitions = new ArrayList<>();
definitions.add(new MockDataSourceDefinition());
addModule("BaseTest", definitions);
}
use of com.serotonin.m2m2.module.ModuleElementDefinition in project ma-core-public by infiniteautomation.
the class MangoTestBase method addModule.
/**
* Add a module to the test. Before the before() method is called.
* @param name
* @param definitions
* @return
*/
protected static void addModule(String name, List<ModuleElementDefinition> definitions) {
MangoTestModule module = new MangoTestModule(name);
for (ModuleElementDefinition definition : definitions) module.addDefinition(definition);
modules.add(module);
}
use of com.serotonin.m2m2.module.ModuleElementDefinition in project ma-core-public by infiniteautomation.
the class PublisherAuditTest method addDefinitions.
@BeforeClass
public static void addDefinitions() {
List<ModuleElementDefinition> definitions = new ArrayList<>();
definitions.add(new MockPublisherDefinition());
addModule("mockPublisher", definitions);
}
Aggregations