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

hr.com.vgv.verano.http.wire.AssertionWire Maven / Gradle / Ivy

There is a newer version: 0.41
Show newest version
package hr.com.vgv.verano.http.wire;

import java.io.IOException;

import hr.com.vgv.verano.http.Assertion;
import hr.com.vgv.verano.http.Dict;
import hr.com.vgv.verano.http.Wire;

public class AssertionWire implements Wire
{
    private final Wire origin;

    private final Assertion assertion;

    public AssertionWire(Wire origin, Assertion assertion)
    {
        this.origin = origin;
        this.assertion = assertion;
    }

    @Override
    public final Dict send(Dict request) throws IOException
    {
        final Dict response = this.origin.send(request);
        this.assertion.test(response);
        return response;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy