public final class Assertions extends Object
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER |
static int |
NO_RESPONSE_STATUS_CODE |
Constructor and Description |
---|
Assertions() |
Modifier and Type | Method and Description |
---|---|
static void |
assertFileContentsFromResource(String resourceBase,
String resourceName,
File output,
String whyWouldItFail) |
static void |
assertWagonExceptionMessage(Exception e,
int forStatusCode,
String forUrl,
String forReasonPhrase,
ProxyInfo proxyInfo)
Assert a WagonException message contains required format and context based on the status code we expected to
trigger it in the first place.
|
public static final int NO_RESPONSE_STATUS_CODE
public Assertions()
public static void assertFileContentsFromResource(String resourceBase, String resourceName, File output, String whyWouldItFail) throws IOException
IOException
public static void assertWagonExceptionMessage(Exception e, int forStatusCode, String forUrl, String forReasonPhrase, ProxyInfo proxyInfo)
This implementation represents the most desired assertions, but HttpWagonTestCase sub-classes could override this method if a specific wagon representation makes it impossible to meet these assertions.
e
- an instance of WagonException
forStatusCode
- the response status code that triggered the exceptionforUrl
- the url that triggered the exceptionforReasonPhrase
- the optional status line reason phrase the server returnedCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.