public class Service extends Object implements org.junit.rules.TestRule
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
<T> T |
getService(Class<T> serviceClass)
Return the service object.
|
public Service(Class<?> serviceClass)
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
public <T> T getService(Class<T> serviceClass)
T
- The type of the service.serviceClass
- Use this class to perform a cast before the object is returned.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.