All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mstream.trader.commons.test.guice.MockServerClientProvider Maven / Gradle / Ivy

The newest version!
package io.mstream.trader.commons.test.guice;

import io.mstream.trader.commons.test.MockServer;
import io.mstream.trader.commons.test.Socket;
import org.mockserver.client.server.MockServerClient;

import javax.inject.Inject;
import javax.inject.Provider;

public class MockServerClientProvider implements Provider {

    private final Socket socket;

    @Inject
    public MockServerClientProvider(@MockServer Socket socket) {
        this.socket = socket;
    }

    @Override
    public MockServerClient get() {
        return new MockServerClient(socket.getHost(), socket.getPort()).reset();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy