Skip to content

Commit 0dab9d5

Browse files
author
Daniel Cohen
committed
renamed urlSuffix to suffix
1 parent e8fbd88 commit 0dab9d5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

cloudinary-core/src/main/java/com/cloudinary/Url.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public Url secureCdnSubdomain(boolean secureCdnSubdomain) {
116116
return this;
117117
}
118118

119-
public Url urlSuffix(String urlSuffix) {
119+
public Url suffix(String urlSuffix) {
120120
this.urlSuffix = urlSuffix;
121121
return this;
122122
}

cloudinary-http42/src/test/java/com/cloudinary/test/CloudinaryTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -475,38 +475,38 @@ public void testResponsiveWidth() {
475475

476476
@Test(expected = RuntimeException.class)
477477
public void testDisallowUrlSuffixInSharedDistribution() {
478-
cloudinary.url().urlSuffix("hello").generate("test");
478+
cloudinary.url().suffix("hello").generate("test");
479479
}
480480

481481
@Test(expected = RuntimeException.class)
482482
public void testDisallowUrlSuffixInNonUploadTypes() {
483-
cloudinary.url().urlSuffix("hello").privateCdn(true).type("facebook").generate("test");
483+
cloudinary.url().suffix("hello").privateCdn(true).type("facebook").generate("test");
484484

485485
}
486486

487487
@Test(expected = RuntimeException.class)
488488
public void testDisallowUrlSuffixWithSlash() {
489-
cloudinary.url().urlSuffix("hello/world").privateCdn(true).generate("test");
489+
cloudinary.url().suffix("hello/world").privateCdn(true).generate("test");
490490
}
491491

492492
@Test(expected = RuntimeException.class)
493493
public void testDisallowUrlSuffixWithDot() {
494-
cloudinary.url().urlSuffix("hello.world").privateCdn(true).generate("test");
494+
cloudinary.url().suffix("hello.world").privateCdn(true).generate("test");
495495
}
496496

497497
@Test
498498
public void testSupportUrlSuffixForPrivateCdn() {
499-
String actual = cloudinary.url().urlSuffix("hello").privateCdn(true).generate("test");
499+
String actual = cloudinary.url().suffix("hello").privateCdn(true).generate("test");
500500
assertEquals("http://test123-res.cloudinary.com/images/test/hello", actual);
501501

502-
actual = cloudinary.url().urlSuffix("hello").privateCdn(true).transformation(new Transformation().angle(0)).generate("test");
502+
actual = cloudinary.url().suffix("hello").privateCdn(true).transformation(new Transformation().angle(0)).generate("test");
503503
assertEquals("http://test123-res.cloudinary.com/images/a_0/test/hello", actual);
504504

505505
}
506506

507507
@Test
508508
public void testPutFormatAfterUrlSuffix() {
509-
String actual = cloudinary.url().urlSuffix("hello").privateCdn(true).format("jpg").generate("test");
509+
String actual = cloudinary.url().suffix("hello").privateCdn(true).format("jpg").generate("test");
510510
assertEquals("http://test123-res.cloudinary.com/images/test/hello.jpg", actual);
511511
}
512512

@@ -519,22 +519,22 @@ public void testNotSignTheUrlSuffix() {
519519
matcher.find();
520520
String expectedSignature = url.substring(matcher.start(), matcher.end());
521521

522-
String actual = cloudinary.url().format("jpg").privateCdn(true).signed(true).urlSuffix("hello").generate("test");
522+
String actual = cloudinary.url().format("jpg").privateCdn(true).signed(true).suffix("hello").generate("test");
523523
assertEquals("http://test123-res.cloudinary.com/images/" + expectedSignature + "/test/hello.jpg", actual);
524524

525525
url = cloudinary.url().format("jpg").signed(true).transformation(new Transformation().angle(0)).generate("test");
526526
matcher = pattern.matcher(url);
527527
matcher.find();
528528
expectedSignature = url.substring(matcher.start(), matcher.end());
529529

530-
actual = cloudinary.url().format("jpg").privateCdn(true).signed(true).urlSuffix("hello").transformation(new Transformation().angle(0)).generate("test");
530+
actual = cloudinary.url().format("jpg").privateCdn(true).signed(true).suffix("hello").transformation(new Transformation().angle(0)).generate("test");
531531

532532
assertEquals("http://test123-res.cloudinary.com/images/" + expectedSignature + "/a_0/test/hello.jpg", actual);
533533
}
534534

535535
@Test
536536
public void testSupportUrlSuffixForRawUploads() {
537-
String actual = cloudinary.url().urlSuffix("hello").privateCdn(true).resourceType("raw").generate("test");
537+
String actual = cloudinary.url().suffix("hello").privateCdn(true).resourceType("raw").generate("test");
538538
assertEquals("http://test123-res.cloudinary.com/files/test/hello", actual);
539539
}
540540

@@ -555,7 +555,7 @@ public void testSupportUseRootPathForPrivateCdn() {
555555
@Test
556556
public void testSupportUseRootPathTogetherWithUrlSuffixForPrivateCdn() {
557557

558-
String actual = cloudinary.url().privateCdn(true).urlSuffix("hello").useRootPath(true).generate("test");
558+
String actual = cloudinary.url().privateCdn(true).suffix("hello").useRootPath(true).generate("test");
559559
assertEquals("http://test123-res.cloudinary.com/test/hello", actual);
560560

561561
}

0 commit comments

Comments
 (0)