Static Public Member Functions | |
| static String | requireTestResourceKey (String asksFor, String... products) |
The resource key for a test that calls the live cloud service, from SHARED_RESOURCE_KEY_NAMES and then the names getOrSetTestResourceKey() reads. | |
| static String | getOrSetTestResourceKey () |
| Obtain a resource key either from environment variable or from a property. | |
| static String | getOrSetTestResourceKey (boolean shouldThrow) |
| static String | getOrSetTestResourceKey (String value, boolean shouldThrow) |
| static String | getOrSetTestResourceKey (String value) |
| static String | getOrSetResourceKey (String value, String variableName, String errorMessage, boolean shouldThrow) |
| Obtain a resource key from the passed argument, from environment variable or from a property. | |
| static String | getOrSetSuperResourceKey (String value, String variablename) |
| static String | getOrSetSuperResourceKey (String value, String variablename, boolean shouldThrow) |
Static Public Attributes | |
| static final String | RESOURCE_KEY_VARIABLE = "_51DEGREES_RESOURCE_KEY" |
| Aligned name of the environment variable or system property which may hold the resource key. | |
| static final String | RESOURCE_KEY_ENV_VAR = "51DEGREES_RESOURCE_KEY" |
The old name of RESOURCE_KEY_VARIABLE, read only when that one is not set. | |
| static final String | TEST_RESOURCE_KEY = "TestResourceKey" |
| static final List< String > | SHARED_RESOURCE_KEY_NAMES |
| The names every cloud test reads a resource key from first, before the names its own example reads. | |
Member Function Documentation
◆ getOrSetResourceKey()
|
static |
Obtain a resource key from the passed argument, from environment variable or from a property.
The aligned RESOURCE_KEY_VARIABLE name is checked first, then the deprecated RESOURCE_KEY_ENV_VAR, then the passed variable name. Store as System Property under the passed variable name.
◆ requireTestResourceKey()
|
static |
The resource key for a test that calls the live cloud service, from SHARED_RESOURCE_KEY_NAMES and then the names getOrSetTestResourceKey() reads.
Fails the test when there is none, because a cloud test that passes without a key has called nothing.
- Parameters
-
asksFor what the test asks the service for products the products the key has to carry
- Returns
- the resource key
Member Data Documentation
◆ RESOURCE_KEY_ENV_VAR
|
static |
The old name of RESOURCE_KEY_VARIABLE, read only when that one is not set.
- Deprecated
- use
RESOURCE_KEY_VARIABLE, and set the variable it names in place of this one.
◆ RESOURCE_KEY_VARIABLE
|
static |
Aligned name of the environment variable or system property which may hold the resource key.
This name is checked first, before the legacy TEST_RESOURCE_KEY name.
◆ SHARED_RESOURCE_KEY_NAMES
|
static |
The names every cloud test reads a resource key from first, before the names its own example reads.
