java webclient post_Java WebClient.post方法代碼示例

本文整理匯總了Java中org.apache.cxf.jaxrs.client.WebClient.post方法的典型用法代碼示例。如果您正苦於以下問題:Java WebClient.post方法的具體用法?Java WebClient.post怎麽用?Java WebClient.post使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.cxf.jaxrs.client.WebClient的用法示例。

在下文中一共展示了WebClient.post方法的21個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。

示例1: test200searchAllUsers

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test200searchAllUsers() {

final String TEST_NAME = "test200searchAllUsers";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/users/search");

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(new QueryType());

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

assertStatus(response, 200);

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(2);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:24,

示例2: getAccessToken

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

private ClientAccessToken getAccessToken() {

JwsHeaders headers = new JwsHeaders(JoseType.JWT, SignatureAlgorithm.RS256);

JwtClaims claims = new JwtClaims();

claims.setIssuer(config.getServiceAccountClientId());

claims.setAudience("https://accounts.google.com/o/oauth2/token");

claims.setSubject(config.getServiceAccountSubject());

long issuedAt = OAuthUtils.getIssuedAt();

long tokenTimeout = config.getServiceAccountTokenLifetime();

claims.setIssuedAt(issuedAt);

claims.setExpiryTime(issuedAt + tokenTimeout);

claims.setProperty("scope", "https://www.googleapis.com/auth/admin.directory.group.readonly https://www.googleapis.com/auth/admin.directory.user");

JwtToken token = new JwtToken(headers, claims);

JwsJwtCompactProducer p = new JwsJwtCompactProducer(token);

String base64UrlAssertion = p.signWith(privateKey);

JwtBearerGrant grant = new JwtBearerGrant(base64UrlAssertion);

WebClient accessTokenService = WebClient.create("https://accounts.google.com/o/oauth2/token",

Arrays.asList(new OAuthJSONProvider(), new AccessTokenGrantWriter()));

accessTokenService.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_JSON);

return accessTokenService.post(grant, ClientAccessToken.class);

}

開發者ID:hlavki,項目名稱:g-suite-identity-sync,代碼行數:27,

示例3: removeSshKey

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void removeSshKey( final EnvironmentId environmentId, final String sshPublicKey ) throws PeerException

{

WebClient client = null;

Response response;

try

{

String path = String.format( "/%s/containers/sshkey/remove", environmentId.getId() );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider );

response = client.post( sshPublicKey );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error removing ssh key in environment: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:25,

示例4: testPdpJSON

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void testPdpJSON() {

if (!waitForWADL()) {

return;

}

WebClient client = WebClient.create(ENDPOINT_ADDRESS);

client.header("Authorization", "Basic YWRtaW46YWRtaW4=");

client.type("application/json");

client.accept("application/json");

client.path("pdp");

String request = readReource("json/request-pdp-1.json");

String response = readReource("json/response-pdp-1.json");

String webRespose = client.post(request, String.class);

assertEquals(response, webRespose);

}

開發者ID:wso2,項目名稱:carbon-identity-framework,代碼行數:21,

示例5: reserveNetworkResource

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public Integer reserveNetworkResource( final NetworkResourceImpl networkResource ) throws PeerException

{

WebClient client = null;

Response response;

try

{

String path = "/netresources";

client = WebClientBuilder.buildPeerWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

response = client.post( networkResource );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( String.format( "Error reserving network resources: %s", e.getMessage() ) );

}

finally

{

WebClientBuilder.close( client );

}

return WebClientBuilder.checkResponse( response, Integer.class );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:27,

示例6: excludePeerFromEnvironment

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void excludePeerFromEnvironment( final String environmentId, final String peerId ) throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = String.format( "/%s/peers/%s/exclude", environmentId, peerId );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( null );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error excluding peer from environment: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:27,

示例7: addPeerEnvironmentPubKey

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void addPeerEnvironmentPubKey( final String keyId, final String pubKeyRing ) throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = String.format( "/pek/add/%s", keyId );

client = WebClientBuilder.buildPeerWebClient( peerInfo, path, provider, 3000, 15000, 1 );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( pubKeyRing );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( String.format( "Error adding PEK: %s", e.getMessage() ) );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:27,

示例8: test132DarthAdderEnableByAdministrator

​點讚 3

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test132DarthAdderEnableByAdministrator() throws Exception {

final String TEST_NAME = "test132DarthAdderEnableByAdministrator";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/users/"+USER_DARTHADDER_OID);

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(MiscUtil.readFile(getRequestFile(MODIFICATION_ENABLE)));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

assertStatus(response, 204);

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(4);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

getDummyAuditService().assertHasDelta(1, ChangeType.MODIFY, UserType.class);

OperationResult result = new OperationResult("test");

PrismObject user = getRepositoryService().getObject(UserType.class, USER_DARTHADDER_OID, null, result);

assertEquals("Wrong administrativeStatus", ActivationStatusType.ENABLED, user.asObjectable().getActivation().getAdministrativeStatus());

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:27,

示例9: configureSshInEnvironment

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void configureSshInEnvironment( final EnvironmentId environmentId, final SshKeys sshKeys )

throws PeerException

{

WebClient client = null;

Response response;

try

{

String path = String.format( "/%s/containers/sshkeys", environmentId.getId() );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

response = client.post( sshKeys );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error configuring ssh in environment: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:28,

示例10: test401AddUserTemplateOverwrite

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test401AddUserTemplateOverwrite() throws Exception {

final String TEST_NAME = "test401AddUserTemplateOverwrite";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/objectTemplates");

client.query("options", "overwrite");

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(getRepoFile(USER_TEMPLATE_FILE));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

assertEquals("Expected 201 but got " + response.getStatus(), 201, response.getStatus());

String location = response.getHeaderString("Location");

String expected = ENDPOINT_ADDRESS + "/objectTemplates/" + USER_TEMPLATE_OID;

assertEquals("Unexpected location, expected: " + expected + " but was " + location,

expected,

location);

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(4);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

getDummyAuditService().assertHasDelta(1, ChangeType.ADD, ObjectTemplateType.class);

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:31,

示例11: updateContainerHostname

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void updateContainerHostname( final String environmentId, final String containerId, final String hostname )

throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = String.format( "/%s/containers/%s/hostname/%s", environmentId, containerId, hostname );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( null );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error updating container hostname: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:28,

示例12: test503generateValueExecute

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test503generateValueExecute() throws Exception {

final String TEST_NAME = "test503generateValueExecute";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/users/" + USER_DARTHADDER_OID + "/generate");

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(getRepoFile(POLICY_ITEM_DEFINITION_GENERATE_EXECUTE));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

traceResponse(response);

assertEquals("Expected 200 but got " + response.getStatus(), 200, response.getStatus());

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(4);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

getDummyAuditService().assertHasDelta(1, ChangeType.MODIFY, UserType.class);

//UserType user = loadObject(UserType.class, USER_DARTHADDER_OID);

//TODO assert changed items

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:28,

示例13: placeEnvironmentInfoByContainerId

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void placeEnvironmentInfoByContainerId( final String environmentId, final String containerId )

throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = String.format( "/%s/info/%s", environmentId, containerId );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider, 5000L, 15000L, 1 );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( null );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error requesting environment info: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:28,

示例14: exportTemplate

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public String exportTemplate( final ContainerId containerId, final String templateName,

final boolean isPrivateTemplate, final String token ) throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path =

String.format( "/%s/containers/%s/template/%s/export/%s/token/%s", containerId.getEnvironmentId(),

containerId.getId(), templateName, isPrivateTemplate, token );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider, 5000L,

Common.TEMPLATE_EXPORT_TIMEOUT_SEC * 1000L, 1 );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( null );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error exporting template: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

return WebClientBuilder.checkResponse( response, String.class );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:31,

示例15: test104AddAccountRawResourceDoesNotExist

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test104AddAccountRawResourceDoesNotExist() throws Exception {

final String TEST_NAME = "test104AddAccountRaw";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/shadows");

client.query("options", "raw");

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(getRepoFile(ACCOUT_CHUCK_FILE));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

// expecting hadnled error because resource doesn't exist.. it is OK, but let's say admin about that

assertStatus(response, 240);

OperationResult addResult = traceResponse(response);

assertNotNull("Expected operation result in the response, but nothing in the body", addResult);

assertEquals("Unexpected status of the operation result. Expected "+ OperationResultStatus.HANDLED_ERROR + ", but was " + addResult.getStatus(), addResult.getStatus(), OperationResultStatus.HANDLED_ERROR);

OperationResult parentResult = new OperationResult("get");

try {

getProvisioning().getObject(ShadowType.class, ACCOUT_CHUCK_OID,

SelectorOptions.createCollection(GetOperationOptions.createDoNotDiscovery()), null,

parentResult);

fail("expected object not found exception but haven't got one.");

} catch (ObjectNotFoundException ex) {

// this is OK..we expect objet not found, because accout was added

// with the raw options which indicates, that it was created only in

// the repository

}

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(4);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

getDummyAuditService().assertHasDelta(1, ChangeType.ADD, ShadowType.class);

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:41,

示例16: createEnvironmentKeyPair

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public PublicKeyContainer createEnvironmentKeyPair( final RelationLinkDto envLink ) throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = "/pek";

client = WebClientBuilder.buildPeerWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( envLink );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( String.format( "Error creating peer environment key: %s", e.getMessage() ) );

}

finally

{

WebClientBuilder.close( client );

}

return WebClientBuilder.checkResponse( response, PublicKeyContainer.class );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:29,

示例17: destroyContainer

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

public void destroyContainer( ContainerId containerId ) throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = String.format( "/%s/container/%s/destroy", containerId.getEnvironmentId().getId(),

containerId.getId() );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( null );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error destroying container: " + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:28,

示例18: stopContainer

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

void stopContainer( ContainerId containerId ) throws PeerException

{

WebClient client = null;

Response response;

try

{

remotePeer.checkRelation();

String path = String.format( "/%s/container/%s/stop", containerId.getEnvironmentId().getId(),

containerId.getId() );

client = WebClientBuilder.buildEnvironmentWebClient( peerInfo, path, provider );

client.type( MediaType.APPLICATION_JSON );

client.accept( MediaType.APPLICATION_JSON );

response = client.post( null );

}

catch ( Exception e )

{

LOG.error( e.getMessage(), e );

throw new PeerException( "Error stopping container:" + e.getMessage() );

}

finally

{

WebClientBuilder.close( client );

}

WebClientBuilder.checkResponse( response );

}

開發者ID:subutai-io,項目名稱:base,代碼行數:28,

示例19: test601modifyPasswordForceChange

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test601modifyPasswordForceChange() throws Exception {

final String TEST_NAME = "test601modifyPasswordForceChange";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/users/" + USER_DARTHADDER_OID);

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(getRequestFile(MODIFICATION_FORCE_PASSWORD_CHANGE));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

traceResponse(response);

assertEquals("Expected 204 but got " + response.getStatus(), 204, response.getStatus());

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(4);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

getDummyAuditService().assertHasDelta(1, ChangeType.MODIFY, UserType.class);

TestUtil.displayWhen(TEST_NAME);

response = client.get();

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

assertEquals("Expected 200 but got " + response.getStatus(), 200, response.getStatus());

UserType userDarthadder = response.readEntity(UserType.class);

CredentialsType credentials = userDarthadder.getCredentials();

assertNotNull("No credentials in user. Something is wrong.", credentials);

PasswordType passwordType = credentials.getPassword();

assertNotNull("No password defined for user. Something is wrong.", passwordType);

assertNotNull("No value for password defined for user. Something is wrong.", passwordType.getValue());

assertTrue(BooleanUtils.isTrue(passwordType.isForceChange()));

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:42,

示例20: test600modifySecurityQuestionAnswer

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test600modifySecurityQuestionAnswer() throws Exception {

final String TEST_NAME = "test600modifySecurityQuestionAnswer";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/users/" + USER_DARTHADDER_OID);

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(getRequestFile(MODIFICATION_REPLACE_ANSWER));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

traceResponse(response);

assertEquals("Expected 204 but got " + response.getStatus(), 204, response.getStatus());

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(4);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

getDummyAuditService().assertHasDelta(1, ChangeType.MODIFY, UserType.class);

TestUtil.displayWhen(TEST_NAME);

response = client.get();

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

assertEquals("Expected 200 but got " + response.getStatus(), 200, response.getStatus());

UserType userDarthadder = response.readEntity(UserType.class);

CredentialsType credentials = userDarthadder.getCredentials();

assertNotNull("No credentials in user. Something is wrong.", credentials);

SecurityQuestionsCredentialsType securityQuestions = credentials.getSecurityQuestions();

assertNotNull("No security questions defined for user. Something is wrong.", securityQuestions);

List secQuestionAnswers = securityQuestions.getQuestionAnswer();

assertEquals("Expected just one question-answer couple, but found " + secQuestionAnswers.size(), 1, secQuestionAnswers.size());

SecurityQuestionAnswerType secQuestionAnswer = secQuestionAnswers.iterator().next();

String decrypted = getPrismContext().getDefaultProtector().decryptString(secQuestionAnswer.getQuestionAnswer());

assertEquals("Unexpected answer " + decrypted + ". Expected 'newAnswer'." , "newAnswer", decrypted);

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:47,

示例21: test515validateValueImplicitPassword

​點讚 2

import org.apache.cxf.jaxrs.client.WebClient; //導入方法依賴的package包/類

@Test

public void test515validateValueImplicitPassword() throws Exception {

final String TEST_NAME = "test515validateValueImplicitPassword";

displayTestTile(this, TEST_NAME);

WebClient client = prepareClient();

client.path("/users/" + USER_DARTHADDER_OID + "/validate");

getDummyAuditService().clear();

TestUtil.displayWhen(TEST_NAME);

Response response = client.post(getRepoFile(POLICY_ITEM_DEFINITION_VALIDATE_IMPLICIT_PASSWORD));

TestUtil.displayThen(TEST_NAME);

displayResponse(response);

assertEquals("Expected 200 but got " + response.getStatus(), 200, response.getStatus());

IntegrationTestTools.display("Audit", getDummyAuditService());

getDummyAuditService().assertRecords(2);

getDummyAuditService().assertLoginLogout(SchemaConstants.CHANNEL_REST_URI);

}

開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:25,

注:本文中的org.apache.cxf.jaxrs.client.WebClient.post方法示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值