Search in sources :

Example 36 with EzySimpleAppSetting

use of com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting in project ezyfox-server by youngmonkeys.

the class EzyAppsStarterTest method test2.

@Test
public void test2() {
    Map<String, ClassLoader> loaders = new ConcurrentHashMap<>();
    EzySimpleZoneContext zoneContext = EzyZoneContextsTest.newDefaultZoneContext();
    EzySimpleApplication app = new EzySimpleApplication();
    EzySimpleAppSetting appSetting = new EzySimpleAppSetting();
    appSetting.setName("abc");
    app.setSetting(appSetting);
    EzySimpleAppContext appContext = new EzySimpleAppContext();
    appContext.setApp(app);
    EzySimpleZoneSetting zoneSetting = new EzySimpleZoneSetting();
    EzySimpleAppsSetting appsSetting = new EzySimpleAppsSetting();
    appsSetting.setItem(appSetting);
    zoneSetting.setApplications(appsSetting);
    zoneContext.addAppContext(appSetting, appContext);
    EzyAppsStarter starter = new EzyAppsStarter.Builder().zoneContext(zoneContext).appClassLoaders(loaders).build();
    starter.start();
}
Also used : EzySimpleAppSetting(com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting) EzySimpleApplication(com.tvd12.ezyfoxserver.EzySimpleApplication) EzySimpleZoneContext(com.tvd12.ezyfoxserver.context.EzySimpleZoneContext) EzySimpleAppsSetting(com.tvd12.ezyfoxserver.setting.EzySimpleAppsSetting) EzyAppsStarter(com.tvd12.ezyfoxserver.EzyAppsStarter) EzySimpleAppContext(com.tvd12.ezyfoxserver.context.EzySimpleAppContext) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) EzySimpleZoneSetting(com.tvd12.ezyfoxserver.setting.EzySimpleZoneSetting) Test(org.testng.annotations.Test) BaseTest(com.tvd12.test.base.BaseTest)

Example 37 with EzySimpleAppSetting

use of com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting in project ezyfox-server by youngmonkeys.

the class EzySimpleAppSettingTest method test.

@Test
public void test() {
    EzySimpleAppSetting setting = new EzySimpleAppSetting();
    setting.setMaxUsers(1);
    setting.setName("hello");
    setting.setHomePath("abc");
    setting.setEntryLoader(TestAppEntryLoader.class);
    System.out.println(setting.getLocation());
    assertEquals(setting.getEntryLoader(), TestAppEntryLoader.class.getName());
}
Also used : EzySimpleAppSetting(com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)34 EzySimpleAppSetting (com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting)29 BaseTest (com.tvd12.test.base.BaseTest)25 EzySimpleApplication (com.tvd12.ezyfoxserver.EzySimpleApplication)17 EzyAppContext (com.tvd12.ezyfoxserver.context.EzyAppContext)12 EzySimpleAppContext (com.tvd12.ezyfoxserver.context.EzySimpleAppContext)11 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)11 EzyAppUserManager (com.tvd12.ezyfoxserver.wrapper.EzyAppUserManager)11 EzyApplication (com.tvd12.ezyfoxserver.EzyApplication)9 EzySimpleZoneContext (com.tvd12.ezyfoxserver.context.EzySimpleZoneContext)9 EzySimpleZone (com.tvd12.ezyfoxserver.EzySimpleZone)8 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)8 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)6 EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)6 EzySimpleAppUserDelegate (com.tvd12.ezyfoxserver.delegate.EzySimpleAppUserDelegate)6 EzySimpleUser (com.tvd12.ezyfoxserver.entity.EzySimpleUser)6 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)6 EzyErrorScheduledExecutorService (com.tvd12.ezyfox.concurrent.EzyErrorScheduledExecutorService)5 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)5 EzyResponse (com.tvd12.ezyfoxserver.response.EzyResponse)5