當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。