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

org.s1.testing.HttpServerTest Maven / Gradle / Ivy

There is a newer version: 2.4.6
Show newest version
package org.s1.testing;

import org.s1.testing.httpclient.TestHttpClient;

/**
 * @author Grigory Pykhov
 */
public abstract class HttpServerTest extends BasicTest{

    protected int getPort(){
        String s = System.getProperty("s1test.http.port",properties.getProperty("http.port","9999"));
        return Integer.parseInt(s);
    }

    protected String getHost(){
        String s = System.getProperty("s1test.http.host",properties.getProperty("http.host","localhost"));
        return s;
    }

    protected String getContext(){
        String s = System.getProperty("s1test.http.context",properties.getProperty("http.context",""));
        return s;
    }

    protected TestHttpClient client(){
        return new TestHttpClient("http",getHost(),getPort());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy