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

dev.galasa.extensions.mocks.MockStatusLine Maven / Gradle / Ivy

There is a newer version: 0.37.0
Show newest version
/*
 * Copyright contributors to the Galasa project
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package dev.galasa.extensions.mocks;

import org.apache.http.HttpStatus;
import org.apache.http.ProtocolVersion;
import org.apache.http.StatusLine;

public class MockStatusLine implements StatusLine {

    // Status code defaults to OK.
    private int code = HttpStatus.SC_OK;

    @Override
    public ProtocolVersion getProtocolVersion() {
        throw new UnsupportedOperationException("Unimplemented method 'getProtocolVersion'");
    }

    @Override
    public String getReasonPhrase() {
        throw new UnsupportedOperationException("Unimplemented method 'getReasonPhrase'");
    }

    public void setStatusCode(int newCode) {
        this.code = newCode ;
    }

    @Override
    public int getStatusCode() {
        return this.code;
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy