@Documented @Retention(value=RUNTIME) @Target(value={ANNOTATION_TYPE,TYPE}) public @interface Application
| Modifier and Type | Required Element and Description |
|---|---|
Class<?> |
value
The class of the application under test that will be configured, started and stopped
before and after each test run.
|
| Modifier and Type | Optional Element and Description |
|---|---|
Class |
clientContract
Specifies the contract implemented by the client.
|
String |
clientName
Specifies the client name.
|
Class<? extends ClientProvider> |
clientProvider
Specifies the class that provides
client provider implementation. |
Class |
clientProviderHint
Specifies a class that aids in the construction of a client.
|
Class |
clientSupplierContract
Specifies the contract implemented by the client supplier.
|
String |
clientSupplierName
Specifies the client supplier name.
|
Class |
serverContract
Specifies the contract implemented by the server.
|
String |
serverName
Specifies the server name.
|
Class<? extends ServerProvider> |
serverProvider
Specifies the class that provides
server provider implementation. |
String |
start
Specifies the name of the method on the
application that will called to
start the application. |
String |
stop
Specifies the name of the method on the
application that will called to
stop the application. |
public abstract Class<?> value
public abstract Class<? extends ClientProvider> clientProvider
client provider implementation.
If a provider is not specified one will be discovered in the class path.public abstract String clientName
Specifies the client name. This useful for giving the client instance a unique name that can be used to qualify and distinguish it from other similar services.
Note that the default client name is "applicationClient".
public abstract Class clientContract
Specifies the contract implemented by the client. This useful for getting the client instance by its contract.
Note that if the client contract class is not specified the client instance will be injectable by its implementation class only.
public abstract String clientSupplierName
Specifies the client supplier name. This useful for giving the client supplier instance a unique name that can be used to qualify and distinguish it from other similar services.
public abstract Class clientSupplierContract
Specifies the contract implemented by the client supplier. This useful for getting the client supplier instance by its contract.
Note that if the client supplier contract class is not specified the client supplier instance will be injectable by its implementation class only.
public abstract Class clientProviderHint
public abstract Class<? extends ServerProvider> serverProvider
server provider implementation.
If a provider is not specified one will be discovered in the class path.public abstract String serverName
Specifies the server name. This useful for giving the server instance a unique name that can be used to qualify and distinguish it from other similar services.
Note that the default server name is "applicationServer".
public abstract Class serverContract
Specifies the contract implemented by the server. This useful for getting the server instance by its contract.
Note that if the server contract class is not specified the server instance will be injectable by its implementation class only.
public abstract String start
Specifies the name of the method on the application that will called to
start the application. This is useful for managing the lifecycle of a generic application
for testing purpose.
Note that the method specified must public, return a void and take no parameters (i.e.
public void start().
Alternatively, the start method can be set to "main" which means
public static void main(String[] args) method will be called. Using the main
method as the start of course implies that the stop() method must be a static
method (i.e. public static void stop().
stop()public abstract String stop
Specifies the name of the method on the application that will called to
stop the application. This is useful for managing the lifecycle of a generic application
for testing purpose.
Note that the method must be public, return a void and take no arguments (i.e.
public void start()). In the event that the start() method is a "main"
method then this method must also be a static method (i.e.
public static void start()).
start()Copyright © 2016–2018 Testify Project. All rights reserved.