use of org.motechproject.admin.bundles.BundleInformation in project motech by motech.
the class ModuleAdminServiceImpl method restartBundle.
@Override
public BundleInformation restartBundle(long bundleId) throws BundleException {
Bundle bundle = getBundle(bundleId);
bundle.stop();
bundle.start();
return new BundleInformation(bundle);
}
use of org.motechproject.admin.bundles.BundleInformation in project motech by motech.
the class ModuleAdminServiceImpl method startBundle.
@Override
public BundleInformation startBundle(long bundleId) throws BundleException {
Bundle bundle = getBundle(bundleId);
bundle.start();
return new BundleInformation(bundle);
}
use of org.motechproject.admin.bundles.BundleInformation in project motech by motech.
the class BundleAdminControllerTest method testRestartBundle.
@Test
public void testRestartBundle() throws BundleException {
when(moduleAdminService.restartBundle(BUNDLE_ID)).thenReturn(bundleInformation);
BundleInformation result = controller.restartBundle(BUNDLE_ID);
assertEquals(bundleInformation, result);
verify(moduleAdminService).restartBundle(BUNDLE_ID);
}
use of org.motechproject.admin.bundles.BundleInformation in project motech by motech.
the class BundleAdminControllerTest method testGetBundleInfo.
@Test
public void testGetBundleInfo() {
when(moduleAdminService.getBundleInfo(BUNDLE_ID)).thenReturn(bundleInformation);
BundleInformation result = controller.getBundle(BUNDLE_ID);
assertEquals(bundleInformation, result);
verify(moduleAdminService).getBundleInfo(BUNDLE_ID);
}
use of org.motechproject.admin.bundles.BundleInformation in project motech by motech.
the class BundleAdminServiceTest method testStartBundle.
@Test
public void testStartBundle() throws BundleException {
setupBundleRetrieval();
BundleInformation bundleInfo = moduleAdminService.startBundle(BUNDLE_ID);
assertEquals(new BundleInformation(bundle), bundleInfo);
verify(bundleContext).getBundle(BUNDLE_ID);
verify(bundle).start();
}
Aggregations