use of il.ac.technion.cs.smarthouse.system.SystemCore in project Smartcity-Smarthouse by TechnionYP5777.
the class ApplicationsCoreTest method init.
@Before
public void init() {
systemCore = new SystemCore();
appCore = systemCore.getSystemApplicationsHandler();
}
use of il.ac.technion.cs.smarthouse.system.SystemCore in project Smartcity-Smarthouse by TechnionYP5777.
the class SystemPresenter method getModel.
public final SystemCore getModel() {
securityCheck();
if (systemCore != null)
return systemCore;
systemCore = new SystemCore();
// TODO: this should look
systemCore.initializeSystemComponents();
return systemCore;
}
use of il.ac.technion.cs.smarthouse.system.SystemCore in project Smartcity-Smarthouse by TechnionYP5777.
the class ApplicationsCoreTest method savebleTest.
@Test
public void savebleTest() throws Exception {
Assert.assertNotNull(appCore.addApplication(new ApplicationPath(PathType.CLASS_NAME, APP1_CLASSPATH)));
ApplicationsCore appCoreNew = new SystemCore().getSystemApplicationsHandler();
appCoreNew.populate(appCore.toJsonString());
assert !appCoreNew.getApplicationManagers().isEmpty();
Assert.assertEquals(appCoreNew.getInstalledApplicationNames().stream().filter(n -> n.equals(APP1_CLASS.getName())).count(), 1);
}
use of il.ac.technion.cs.smarthouse.system.SystemCore in project Smartcity-Smarthouse by TechnionYP5777.
the class AlertsServiceTest method init.
@Before
public void init() {
serviceManager_noUser = new ServiceManager(new SystemCore());
SystemCore s = new SystemCore();
serviceManager_withUser = new ServiceManager(s);
s.initializeUser("Bob", "123", "050", "HERE");
s.getUser().addContact(new Contact("111", "Alice", "999", "a@b.com"), EmergencyLevel.SMS_EMERGENCY_CONTACT);
s.getUser().addContact(new Contact("111", "Alice", "999", "a@b.com"), EmergencyLevel.EMAIL_EMERGENCY_CONTACT);
s.getUser().addContact(new Contact("111", "Alice", "999", "a@b.com"), EmergencyLevel.CALL_EMERGENCY_CONTACT);
}
Aggregations