I have created my mappings by recording the server's transactions. Now I want to use my json mapping file(s) to load the mappings. For that I have the code below:
import com.github.tomakehurst.wiremock.WireMockServer;
public class mockedTests{
public static WireMockServer mockingServer;
public void loadMaps(){
mockingServer.loadMappingsUsing(****);
}
}
I checked the wiremock code and the loadMappingsUsing
method needs a MappingsLoader
as its parameter. However, I can't find a way to create a MappingsLoader
properly. I couldn't find anything in the documentation and I can't find any examples nor tutorials online. Furthermore, I am stuck with using a WireMockServer
object rather than a rule or a WireMock
object. Does anyone know how I can create a MappingsLoader
to load my mappings json file(s)? I am using the standalone version of wiremock. Thanks.