forked from fanruan/finekit
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.
40 lines
1.1 KiB
40 lines
1.1 KiB
package com.fanruan.api; |
|
|
|
import com.fr.config.dao.DaoContext; |
|
import com.fr.config.dao.impl.LocalClassHelperDao; |
|
import com.fr.config.dao.impl.LocalEntityDao; |
|
import com.fr.config.dao.impl.LocalXmlEntityDao; |
|
import com.fr.runtime.FineRuntime; |
|
import com.fr.store.StateHubManager; |
|
import com.fr.store.impl.MemoryLock; |
|
import com.fr.store.impl.MemoryStore; |
|
import org.junit.After; |
|
import org.junit.Before; |
|
|
|
/** |
|
* @author richie |
|
* @version 10.0 |
|
* Created by richie on 2019-08-09 |
|
*/ |
|
public class Prepare { |
|
|
|
@Before |
|
public void start() { |
|
FineRuntime.start(); |
|
DaoContext.setEntityDao(new LocalEntityDao()); |
|
DaoContext.setClassHelperDao(new LocalClassHelperDao()); |
|
DaoContext.setXmlEntityDao(new LocalXmlEntityDao()); |
|
StateHubManager.setStorage(new MemoryStore()); |
|
StateHubManager.setLock(new MemoryLock()); |
|
} |
|
|
|
@After |
|
public void stop() { |
|
DaoContext.setEntityDao(null); |
|
DaoContext.setClassHelperDao(null); |
|
DaoContext.setXmlEntityDao(null); |
|
StateHubManager.setStorage(null); |
|
StateHubManager.setLock(null); |
|
} |
|
|
|
}
|
|
|