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.
44 lines
1.4 KiB
44 lines
1.4 KiB
5 years ago
|
package com.fanruan.api.decision;
|
||
|
|
||
|
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.decision.config.AppearanceConfig;
|
||
|
import com.fr.runtime.FineRuntime;
|
||
|
import com.fr.store.StateHubManager;
|
||
|
import com.fr.store.impl.MemoryLock;
|
||
|
import com.fr.store.impl.MemoryStore;
|
||
|
import com.fr.transaction.Configurations;
|
||
|
import com.fr.transaction.LocalConfigurationHelper;
|
||
|
import org.junit.Assert;
|
||
|
import org.junit.Before;
|
||
|
import org.junit.Test;
|
||
|
|
||
|
/**
|
||
|
* @author lidongy
|
||
|
* @version 10.0
|
||
|
* Created by lidongy on 2019/10/24
|
||
|
*/
|
||
|
public class AppearenceKitTest {
|
||
|
@Before
|
||
|
public void start() {
|
||
|
FineRuntime.start();
|
||
|
DaoContext.setEntityDao(new LocalEntityDao());
|
||
|
DaoContext.setClassHelperDao(new LocalClassHelperDao());
|
||
|
DaoContext.setXmlEntityDao(new LocalXmlEntityDao());
|
||
|
Configurations.setHelper(new LocalConfigurationHelper());
|
||
|
StateHubManager.setStorage(new MemoryStore());
|
||
|
StateHubManager.setLock(new MemoryLock());
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
public void TestGetLoginPageId() {
|
||
|
AppearanceConfig.getInstance().setLoginPageId("111");
|
||
|
Assert.assertEquals(AppearanceKit.getLoginPageId(), "111");
|
||
|
|
||
|
AppearanceConfig.getInstance().setLoginPageId("aaa");
|
||
|
Assert.assertEquals(AppearanceKit.getLoginPageId(), "aaa");
|
||
|
}
|
||
|
}
|