Skip to content

Commit 0370c80

Browse files
committed
update tests for doc sample code
1 parent 29cfc21 commit 0370c80

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/java/com/uid2/client/DocSampleCodeTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,15 @@ public void testPublisherBasicUsageExample() {
373373
PublisherUid2Client publisherUid2Client = new PublisherUid2Client(UID2_BASE_URL, UID2_API_KEY, UID2_SECRET_KEY);
374374

375375
// Documentation sdk-ref-java.md Line 147: Generate token from email with opt-out check
376-
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
376+
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com"));
377377

378378
assertNotNull(tokenGenerateResponse);
379379
}
380380

381381
@Test
382382
public void testPublisherClientServerIntegrationExample() {
383383
// Documentation sdk-ref-java.md Line 147: Publisher Client-Server Integration - generate token response
384-
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
384+
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com"));
385385

386386
// Documentation sdk-ref-java.md Line 165: Send identity as JSON string back to client
387387
String identityJsonString = tokenGenerateResponse.getIdentityJsonString();
@@ -396,7 +396,7 @@ public void testPublisherClientServerIntegrationExample() {
396396
@Test
397397
public void testPublisherServerSideIntegrationExample() {
398398
// Documentation sdk-ref-java.md Line 147: Publisher Server-Side Integration workflow - generate token
399-
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
399+
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com"));
400400

401401
// Documentation sdk-ref-java.md Line 176: Store identity as JSON string
402402
String identityJsonString = tokenGenerateResponse.getIdentityJsonString();
@@ -443,7 +443,7 @@ public void testPublisherAdvancedUsageExample() {
443443
PublisherUid2Helper publisherUid2Helper = new PublisherUid2Helper(UID2_SECRET_KEY);
444444

445445
// Documentation sdk-ref-java.md Line 224: Create envelope for token generate request
446-
EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
446+
EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com"));
447447

448448
assertNotNull(envelope);
449449
assertNotNull(envelope.getEnvelope());
@@ -472,7 +472,7 @@ public void testPublisherAdvancedUsageExample() {
472472
public void testPublisherAdvancedClientServerExample() {
473473
// Documentation sdk-ref-java.md Line 250-252: Publisher Advanced Client-Server Integration
474474
PublisherUid2Helper publisherUid2Helper = new PublisherUid2Helper(UID2_SECRET_KEY);
475-
EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
475+
EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com"));
476476

477477
// Documentation sdk-ref-java.md Line 251: Get identity JSON string from token generate response
478478
// tokenGenerateResponse.getIdentityJsonString() - line 251
@@ -485,7 +485,7 @@ public void testPublisherAdvancedServerSideExample() {
485485
PublisherUid2Helper publisherUid2Helper = new PublisherUid2Helper(UID2_SECRET_KEY);
486486

487487
// Simulate the full advanced flow
488-
EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
488+
EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com"));
489489

490490
// Documentation sdk-ref-java.md Line 275-277: Generate IdentityTokens object from JSON
491491
String identityJsonString = "{}"; // Mock data
@@ -525,7 +525,7 @@ public void testPublisherAdvancedTokenRefreshResponse() {
525525
PublisherUid2Helper publisherUid2Helper = new PublisherUid2Helper(UID2_SECRET_KEY);
526526

527527
// First create a valid identity to use for refresh response
528-
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut());
528+
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("user@example.com"));
529529

530530
if (tokenGenerateResponse != null && tokenGenerateResponse.getIdentity() != null) {
531531
IdentityTokens identity = tokenGenerateResponse.getIdentity();

0 commit comments

Comments
 (0)