Package net.officefloor.server.http
Class HttpClientExtension
- java.lang.Object
-
- net.officefloor.server.http.AbstractHttpClientJUnit<HttpClientExtension>
-
- net.officefloor.server.http.HttpClientExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.Extension
public class HttpClientExtension extends AbstractHttpClientJUnit<HttpClientExtension> implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.AfterAllCallback
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description HttpClientExtension()
Instantiate for non-secure (HTTP) connection toHttpServer
.HttpClientExtension(boolean isSecure)
Instantiate with flagging if secure (HTTPS) connection toHttpServer
.HttpClientExtension(boolean isSecure, int port)
Instantiate indicating the server port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterAll(org.junit.jupiter.api.extension.ExtensionContext context)
void
afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
void
beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
void
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
-
Methods inherited from class net.officefloor.server.http.AbstractHttpClientJUnit
closeHttpClient, execute, followRedirects, getHttpClient, openHttpClient, timeout, url
-
-
-
-
Constructor Detail
-
HttpClientExtension
public HttpClientExtension()
Instantiate for non-secure (HTTP) connection toHttpServer
.
-
HttpClientExtension
public HttpClientExtension(boolean isSecure)
Instantiate with flagging if secure (HTTPS) connection toHttpServer
.- Parameters:
isSecure
- Indicates if secure (HTTPS).
-
HttpClientExtension
public HttpClientExtension(boolean isSecure, int port)
Instantiate indicating the server port.- Parameters:
isSecure
- Indicates if secure (HTTPS).port
- Server port to connect.
-
-
Method Detail
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
- Throws:
java.lang.Exception
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
- Throws:
java.lang.Exception
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
afterEach
in interfaceorg.junit.jupiter.api.extension.AfterEachCallback
- Throws:
java.lang.Exception
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
afterAll
in interfaceorg.junit.jupiter.api.extension.AfterAllCallback
- Throws:
java.lang.Exception
-
-