Package com.github.tomakehurst.wiremock.global

Examples of com.github.tomakehurst.wiremock.global.GlobalSettings


public class GlobalSettingsUpdateTask implements AdminTask {

    @Override
    public ResponseDefinition execute(Admin admin, Request request) {
        GlobalSettings newSettings = Json.read(request.getBodyAsString(), GlobalSettings.class);
        admin.updateGlobalSettings(newSettings);
        return ResponseDefinition.ok();
    }
View Full Code Here


  public static void setGlobalFixedDelay(int milliseconds) {
    defaultInstance.setGlobalFixedDelayVariable(milliseconds);
  }
 
  public void setGlobalFixedDelayVariable(int milliseconds) {
    GlobalSettings settings = new GlobalSettings();
    settings.setFixedDelay(milliseconds);
    admin.updateGlobalSettings(settings);
  }
View Full Code Here

    "}                        ";
 
  @Test
  public void shouldUpdateGlobalSettings() {
        context.checking(new Expectations() {{
            GlobalSettings expectedSettings = new GlobalSettings();
            expectedSettings.setFixedDelay(2000);
            allowing(admin).updateGlobalSettings(expectedSettings);
        }});

    handler.handle(aRequest(context)
        .withUrl("/settings")
View Full Code Here

TOP

Related Classes of com.github.tomakehurst.wiremock.global.GlobalSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.