package org.bench4q.web.test.masterMessager;

import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.client.WireMock;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;

public abstract class MessagerTestBase {
	private static WireMockServer wireMockServer;
	private  static WireMock wireMock;
	private static final int port = 6000;

	protected static void startServer() {
		WireMockConfiguration wmc = new WireMockConfiguration();
		wmc.bindAddress("localhost");
		wmc.port(port);
		wireMockServer = new WireMockServer(wmc);
		wireMockServer.start();
		wireMock = new WireMock("localhost", port);
	}

	protected static  void stopServer() {
		wireMockServer.stop();
	}

	public WireMock getWireMock() {
		return wireMock;
	}

}
