Add xsd and docker
Change-Id: Ifad2e3a8678a487e6f13114f910e19bce4d80964
This commit is contained in:
parent
d71c191f0f
commit
80dbbc034f
33 changed files with 313 additions and 348 deletions
|
@ -18,9 +18,7 @@ import javax.xml.bind.JAXBContext
|
|||
class RemoteMockServer {
|
||||
private final String address
|
||||
private final CloseableHttpClient client = HttpClients.createDefault()
|
||||
private static final JAXBContext requestContext = JAXBContext.newInstance(AddMock.package.name, AddMock.classLoader)
|
||||
private static
|
||||
final JAXBContext responseContext = JAXBContext.newInstance(MockAdded.package.name, MockAdded.classLoader)
|
||||
private static final JAXBContext requestContext = JAXBContext.newInstance(AddMock, PeekMock, RemoveMock)
|
||||
|
||||
RemoteMockServer(String host, int port) {
|
||||
address = "http://$host:$port/serverControl"
|
||||
|
@ -70,7 +68,7 @@ class RemoteMockServer {
|
|||
List<MockReport> listMocks() {
|
||||
HttpGet get = new HttpGet(address)
|
||||
CloseableHttpResponse response = client.execute(get)
|
||||
MockListing mockListing = Util.extractResponse(response) as MockListing
|
||||
return mockListing.mocks
|
||||
Mocks mocks = Util.extractResponse(response) as Mocks
|
||||
return mocks.mocks
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue