use of com.artezio.arttime.services.SettingsService in project ART-TIME by Artezio.
the class IniWebEnvironmentTest method testGetsettingsService_ifNotNull.
@Test
public void testGetsettingsService_ifNotNull() throws NoSuchFieldException {
setField(iniWebEnvironment, "settingsService", settingsService);
SettingsService actual = iniWebEnvironment.getSettingsService();
assertNotNull(actual);
assertSame(settingsService, actual);
}
use of com.artezio.arttime.services.SettingsService in project ART-TIME by Artezio.
the class IniWebEnvironmentTest method testGetsettingsService_ifNull.
@Test
public void testGetsettingsService_ifNull() throws NoSuchFieldException {
setField(iniWebEnvironment, "settingsService", null);
PowerMock.mockStatic(CDIUtils.class);
expect(CDIUtils.getBean(SettingsService.class)).andReturn(settingsService);
PowerMock.replayAll(CDIUtils.class);
SettingsService actual = iniWebEnvironment.getSettingsService();
PowerMock.verifyAll();
assertNotNull(actual);
assertSame(settingsService, actual);
}
use of com.artezio.arttime.services.SettingsService in project ART-TIME by Artezio.
the class SynchronizerTest method setUp.
@Before
public void setUp() throws NoSuchFieldException {
synchronizer = new Synchronizer();
settings = new Settings(new EnumMap<>(Setting.Name.class));
mockControl = EasyMock.createControl();
employeeSynchronizer = mockControl.createMock(EmployeeSynchronizerLocal.class);
teamSynchronizer = mockControl.createMock(TeamSynchronizer.class);
projectService = mockControl.createMock(ProjectService.class);
settingsService = mockControl.createMock(SettingsService.class);
setField(synchronizer, "employeeSynchronizer", employeeSynchronizer);
setField(synchronizer, "teamSynchronizer", teamSynchronizer);
setField(synchronizer, "projectService", projectService);
setField(synchronizer, "settingsService", settingsService);
setField(synchronizer, "settings", settings);
}
Aggregations