当前位置: 首页>>代码示例>>Java>>正文


Java RestAssured.basePath方法代码示例

本文整理汇总了Java中io.restassured.RestAssured.basePath方法的典型用法代码示例。如果您正苦于以下问题:Java RestAssured.basePath方法的具体用法?Java RestAssured.basePath怎么用?Java RestAssured.basePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.restassured.RestAssured的用法示例。


在下文中一共展示了RestAssured.basePath方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Resource

import io.restassured.RestAssured; //导入方法依赖的package包/类
public Resource(HashMap<CommsRouterResource, String> state) {
  RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
  java.util.Map<String, String> env = System.getenv();

  if (System.getProperty("autHost") == null) {
    String host = env.get("AUT_HOST");
    if (host != null) {
      RestAssured.baseURI = host;
    } else {
      RestAssured.baseURI = "http://localhost:8080";
    }
  } else {
    // you can specify it using -DautHost=http://localhost:8080
    RestAssured.baseURI = System.getProperty("autHost");
  }
  RestAssured.basePath = "/comms-router-web/api";
  this.state = state;
}
 
开发者ID:Nexmo,项目名称:comms-router,代码行数:19,代码来源:Resource.java

示例2: setup

import io.restassured.RestAssured; //导入方法依赖的package包/类
@Before
public void setup() {
	RestAssured.baseURI = "https://127.0.0.1:6443/as-api";
	RestAssured.basePath = "/api/v1";
	//单项认证允许所有客户端通过
	RestAssured.useRelaxedHTTPSValidation();
}
 
开发者ID:strictnerd,项目名称:LearningSummary,代码行数:8,代码来源:HTTPAPITest.java

示例3: setup

import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeClass
public static void setup() {
	String port = System.getProperty("server.port");
	RestAssured.port = (port == null) ? 8082 : Integer.valueOf(port);

	String basePath = System.getProperty("server.base");
	if (basePath == null) 
		basePath = "/openrouteservice-" + Utils.getORSVersion() + "/";
	
	RestAssured.basePath = basePath;

	String baseHost = System.getProperty("server.host");
	if (baseHost == null) 
		baseHost = "http://localhost";
	
	RestAssured.baseURI = baseHost;
}
 
开发者ID:GIScience,项目名称:openrouteservice,代码行数:18,代码来源:ServiceTest.java

示例4: setup

import io.restassured.RestAssured; //导入方法依赖的package包/类
@Before
public void setup() {
	RestAssured.baseURI = "https://127.0.0.1:8443/web";
	RestAssured.basePath = "";
	//RestAssured.useRelaxedHTTPSValidation();
	//RestAssured.config = RestAssuredConfig.newConfig().sslConfig(SSLConfig.sslConfig().allowAllHostnames());
			
	RestAssured.authentication = RestAssured
			.certificate("clq.truststore",
					"123456","clq.p12", "123456",
					CertificateAuthSettings
					.certAuthSettings()
					.keyStoreType("PKCS12")
					.trustStoreType("jks"));
}
 
开发者ID:strictnerd,项目名称:LearningSummary,代码行数:16,代码来源:HTTPSApiJsonTest.java

示例5: initClass

import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeAll
public static void initClass(){
    restController.setControllerPort(0);
    restController.startTheControllerServer();

    RestAssured.baseURI = "http://localhost";
    RestAssured.port = restController.getControllerServerPort();
    RestAssured.basePath = "/controller/api";
    RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
}
 
开发者ID:EMResearch,项目名称:EvoMaster,代码行数:11,代码来源:SutControllerTest.java

示例6: setUpRestAssured

import io.restassured.RestAssured; //导入方法依赖的package包/类
/**
 * Sets up RestAssured test framework before tests.
 */
@BeforeTest
public void setUpRestAssured() {
    RestAssured.reset();
    RestAssured.port = ENDPOINT_PORT;
    RestAssured.basePath = "";
}
 
开发者ID:krizsan,项目名称:rest-example,代码行数:10,代码来源:RestResourceTestBase.java

示例7: startingApplicationUp

import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeClass
public void startingApplicationUp() {
    RestAssured.basePath = "sample-app";
    int port = SocketUtils.findAvailableTcpPort();
    RestAssured.port = port;

    SpringApplication springApplication = new SpringApplication(Application.class);
    springApplication.addListeners(new LogbackTestApplicationListener());
    springApplication.run("--server.port=" + port).registerShutdownHook();
}
 
开发者ID:paypal,项目名称:resteasy-spring-boot,代码行数:11,代码来源:CommonUseCasesIT.java

示例8: setUp

import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeClass
public void setUp() {
    int appPort = SocketUtils.findAvailableTcpPort();

    RestAssured.basePath = "sample-app";
    RestAssured.port = appPort;

    Properties properties = new Properties();
    properties.put("server.context-parameters.resteasy.async.job.service.enabled", true);

    SpringApplication app = new SpringApplication(Application.class);
    app.setDefaultProperties(properties);
    app.addListeners(new LogbackTestApplicationListener());
    app.run("--server.port=" + appPort).registerShutdownHook();
}
 
开发者ID:paypal,项目名称:resteasy-spring-boot,代码行数:16,代码来源:AsyncJobIT.java

示例9: setUp

import io.restassured.RestAssured; //导入方法依赖的package包/类
@BeforeClass
public void setUp() {
    app1Port = SocketUtils.findAvailableTcpPort();
    app2Port = SocketUtils.findAvailableTcpPort();

    RestAssured.basePath = "sample-app";
}
 
开发者ID:paypal,项目名称:resteasy-spring-boot,代码行数:8,代码来源:MultipleContextsIT.java

示例10: abstractBefore

import io.restassured.RestAssured; //导入方法依赖的package包/类
@Before
public final void abstractBefore() {
    RestAssured.baseURI = "http://localhost";
    RestAssured.basePath = basePath;
    RestAssured.port = getApplicationPort(applicationName);
}
 
开发者ID:enadim,项目名称:spring-cloud-ribbon-extensions,代码行数:7,代码来源:AbstractTest.java

示例11: setup

import io.restassured.RestAssured; //导入方法依赖的package包/类
@Before
public void setup() {
    RestAssured.baseURI  = "http://localhost";
    RestAssured.port     = port;
    RestAssured.basePath = "/";
}
 
开发者ID:whunmr,项目名称:spring-server,代码行数:7,代码来源:InstancesApiTest.java

示例12: setupURL

import io.restassured.RestAssured; //导入方法依赖的package包/类
@Before
public void setupURL() {
    RestAssured.baseURI = "http://localhost";
    RestAssured.port = port;
    RestAssured.basePath = "/";
}
 
开发者ID:brightzheng100,项目名称:springboot-jersey-swagger,代码行数:7,代码来源:ApplicationTests.java


注:本文中的io.restassured.RestAssured.basePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。