public class DSWActivatorTest extends TestCase {
public void testStartStop() throws Exception{
BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
final Activator a = EasyMock.createNiceMock(Activator.class);
a.setBundleContext(bc);
EasyMock.expectLastCall().atLeastOnce();
a.start();
EasyMock.expectLastCall().once();
EasyMock.replay(bc);
EasyMock.replay(a);
DSWActivator da = new DSWActivator(){
protected org.apache.cxf.dosgi.dsw.Activator createActivator() {
return a;
};
};
da.start(bc);
EasyMock.verify(a);
EasyMock.reset(a);
a.stop();
EasyMock.expectLastCall().once();
EasyMock.replay(a);
da.stop(bc);