com.github.tonivade.zeromock.junit4.ZIOMockHttpServerRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zeromock-junit4 Show documentation
Show all versions of zeromock-junit4 Show documentation
Mock Http Server (mostly) without dependencies
/*
* Copyright (c) 2018-2020, Antonio Gabriel Muñoz Conejo
* Distributed under the terms of the MIT License
*/
package com.github.tonivade.zeromock.junit4;
import static com.github.tonivade.purefun.Producer.cons;
import static com.github.tonivade.zeromock.server.ZIOMockHttpServer.builder;
import com.github.tonivade.purefun.Kind;
import com.github.tonivade.purefun.Nothing;
import com.github.tonivade.purefun.effect.ZIO_;
public class ZIOMockHttpServerRule extends AbstractMockServerRule, Nothing>> {
public ZIOMockHttpServerRule(R env) {
this(env, 0);
}
public ZIOMockHttpServerRule(R env, int port) {
super(builder(cons(env)).port(port).build());
}
}