Skip to content

Commit

Permalink
feat(generated): update generator to 3.90.1
Browse files Browse the repository at this point in the history
Generated SDK source code using:
- Generator version 3.90.1
- Specification version 1.0.0-dev0.1.9
- Automation (cloudant-sdks) version 4ba63d2

Signed-off-by: cloudant-sdks-automation <71659186+cloudant-sdks-automation@users.noreply.github.com>
  • Loading branch information
cloudant-sdks-automation authored and eiri committed May 15, 2024
1 parent 984741e commit 953b26a
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public void testPostDocument() throws Exception {
try {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -814,7 +814,7 @@ public void testPostBulkDocs() throws Exception {
try {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -1149,7 +1149,7 @@ public void testPutDocument() throws Exception {
try {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -1276,7 +1276,7 @@ public void testPutDesignDocument() throws Exception {
try {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -2406,7 +2406,7 @@ public void testPutReplicationDocument() throws Exception {
try {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -2911,7 +2911,7 @@ public void testPutLocalDocument() throws Exception {
try {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ public void testPostDocumentWOptions() throws Throwable {
// Construct an instance of the Attachment model
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -1440,7 +1440,7 @@ public void testPostBulkDocsWOptions() throws Throwable {
// Construct an instance of the Attachment model
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -2172,7 +2172,7 @@ public void testPutDocumentWOptions() throws Throwable {
// Construct an instance of the Attachment model
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -2463,7 +2463,7 @@ public void testPutDesignDocumentWOptions() throws Throwable {
// Construct an instance of the Attachment model
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -4680,7 +4680,7 @@ public void testPutReplicationDocumentWOptions() throws Throwable {
// Construct an instance of the Attachment model
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down Expand Up @@ -5790,7 +5790,7 @@ public void testPutLocalDocumentWOptions() throws Throwable {
// Construct an instance of the Attachment model
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class AttachmentTest {
public void testAttachment() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -43,7 +43,7 @@ public void testAttachment() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand All @@ -57,7 +57,7 @@ public void testAttachment() throws Throwable {
Attachment attachmentModelNew = TestUtilities.deserialize(json, Attachment.class);
assertTrue(attachmentModelNew instanceof Attachment);
assertEquals(attachmentModelNew.contentType(), "testString");
assertEquals(attachmentModelNew.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModelNew.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModelNew.digest(), "testString");
assertEquals(attachmentModelNew.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModelNew.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class BulkDocsTest {
public void testBulkDocs() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -47,7 +47,7 @@ public void testBulkDocs() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class DesignDocumentTest {
public void testDesignDocument() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -51,7 +51,7 @@ public void testDesignDocument() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class DocumentTest {
public void testDocument() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -46,7 +46,7 @@ public void testDocument() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class PostBulkDocsOptionsTest {
public void testPostBulkDocsOptions() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -49,7 +49,7 @@ public void testPostBulkDocsOptions() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PostDocumentOptionsTest {
public void testPostDocumentOptions() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -48,7 +48,7 @@ public void testPostDocumentOptions() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class PutDesignDocumentOptionsTest {
public void testPutDesignDocumentOptions() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -52,7 +52,7 @@ public void testPutDesignDocumentOptions() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PutDocumentOptionsTest {
public void testPutDocumentOptions() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -48,7 +48,7 @@ public void testPutDocumentOptions() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PutLocalDocumentOptionsTest {
public void testPutLocalDocumentOptions() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -48,7 +48,7 @@ public void testPutLocalDocumentOptions() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class PutReplicationDocumentOptionsTest {
public void testPutReplicationDocumentOptions() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -53,7 +53,7 @@ public void testPutReplicationDocumentOptions() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ReplicationDocumentTest {
public void testReplicationDocument() throws Throwable {
Attachment attachmentModel = new Attachment.Builder()
.contentType("testString")
.data(TestUtilities.createMockByteArray("This is a mock byte array value."))
.data(TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="))
.digest("testString")
.encodedLength(Long.valueOf("0"))
.encoding("testString")
Expand All @@ -52,7 +52,7 @@ public void testReplicationDocument() throws Throwable {
.stub(true)
.build();
assertEquals(attachmentModel.contentType(), "testString");
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("This is a mock byte array value."));
assertEquals(attachmentModel.data(), TestUtilities.createMockByteArray("VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4="));
assertEquals(attachmentModel.digest(), "testString");
assertEquals(attachmentModel.encodedLength(), Long.valueOf("0"));
assertEquals(attachmentModel.encoding(), "testString");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package com.ibm.cloud.cloudant.v1.utils;

import java.util.Base64;
import java.util.Map;
import java.util.Set;
import java.util.List;
Expand Down Expand Up @@ -116,8 +117,8 @@ public static List<FileWithMetadata> creatMockListFileWithMetadata() {
return list;
}

public static byte[] createMockByteArray(String bytes) {
return bytes.getBytes();
public static byte[] createMockByteArray(String encodedString) throws Exception {
return Base64.getDecoder().decode(encodedString);
}

public static Date createMockDate(String date) throws Exception {
Expand Down

0 comments on commit 953b26a

Please sign in to comment.