You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
51 lines
1.5 KiB
package com.fanruan.api; |
|
|
|
import com.fr.base.operator.common.CommonOperator; |
|
import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; |
|
import com.fr.config.activator.BaseDBActivator; |
|
import com.fr.config.activator.ConfigurationActivator; |
|
import com.fr.env.operator.CommonOperatorImpl; |
|
import com.fr.general.I18nResource; |
|
import com.fr.module.Module; |
|
import com.fr.module.tool.ActivatorToolBox; |
|
import com.fr.report.ReportActivator; |
|
import com.fr.report.RestrictionActivator; |
|
import com.fr.report.module.ReportBaseActivator; |
|
import com.fr.scheduler.SchedulerActivator; |
|
import com.fr.store.StateServiceActivator; |
|
import com.fr.workspace.simple.SimpleWork; |
|
import org.junit.After; |
|
import org.junit.Before; |
|
|
|
/** |
|
* @author zack |
|
* @date 2019/8/26 |
|
* @version 10.0 |
|
*/ |
|
public class ModulePrepare { |
|
Module module = null; |
|
|
|
@Before |
|
public void start() { |
|
module = ActivatorToolBox.simpleLink( |
|
new BaseDBActivator(), |
|
new ConfigurationActivator(), |
|
new StandaloneModeActivator(), |
|
new StateServiceActivator(), |
|
new SchedulerActivator(), |
|
new ReportBaseActivator(), |
|
new RestrictionActivator(), |
|
new ReportActivator() |
|
); |
|
SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); |
|
I18nResource.getInstance(); |
|
module.start(); |
|
} |
|
|
|
@After |
|
public void stop() { |
|
if (module != null) { |
|
module.stop(); |
|
} |
|
} |
|
} |