public abstract class WatsonServiceTest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CONTENT_TYPE
The Constant CONTENT_TYPE.
|
protected static java.lang.String |
PLACEHOLDER
The Constant PLACEHOLDER.
|
protected static java.util.Properties |
properties
The prop.
|
| Constructor and Description |
|---|
WatsonServiceTest()
Instantiates a new watson service test.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
getDefaultHeaders()
Gets the default test headers.
|
java.lang.String |
getProperty(java.lang.String property)
Gets the valid property.
|
static java.lang.String |
getStringFromInputStream(java.io.InputStream is)
Gets the string from input stream.
|
static <T> T |
loadFixture(java.lang.String filename,
java.lang.Class<T> returnType)
Loads fixture.
|
void |
setUp()
Sets the up.
|
static void |
writeInputStreamToFile(java.io.InputStream inputStream,
java.io.File file)
Write input stream to file.
|
protected static final java.lang.String PLACEHOLDER
protected static final java.lang.String CONTENT_TYPE
protected static java.util.Properties properties
public WatsonServiceTest()
protected java.util.Map<java.lang.String,java.lang.String> getDefaultHeaders()
public static java.lang.String getStringFromInputStream(java.io.InputStream is)
is - the input streampublic java.lang.String getProperty(java.lang.String property)
property - the propertypublic static void writeInputStreamToFile(java.io.InputStream inputStream,
java.io.File file)
inputStream - the input streamfile - the filepublic static <T> T loadFixture(java.lang.String filename,
java.lang.Class<T> returnType)
throws java.io.FileNotFoundException
T - the return typefilename - the file namereturnType - the return typejava.io.FileNotFoundException - the file not found exceptionpublic void setUp()
throws java.lang.Exception
java.lang.Exception - the exception