|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdemo.org.powermock.examples.tutorial.staticmocking.impl.withoutpowermock.ServiceRegistratorWithoutPowerMock
public class ServiceRegistratorWithoutPowerMock
This refactored implementation demonstrate how one could test the
ServiceRegistrator class without using PowerMock.
| Constructor Summary | |
|---|---|
ServiceRegistratorWithoutPowerMock()
Default constructor, initializes internal state. |
|
| Method Summary | |
|---|---|
protected long |
generateId()
|
long |
registerService(String name,
Object serviceImplementation)
Registers a service to the service framework. |
void |
unregisterService(long id)
Unregisters a service from the service framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceRegistratorWithoutPowerMock()
| Method Detail |
|---|
public long registerService(String name,
Object serviceImplementation)
registerService in interface IServiceRegistratorname - The name of the service the register.serviceImplementation - The implementation of the service.
protected long generateId()
public void unregisterService(long id)
unregisterService in interface IServiceRegistratorid - The id of the service that should be removed. The id was
generated by IServiceRegistrator.registerService(String, Object).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||