Skip to content

Commit 031831b

Browse files
committed
test: generate scenario to tet couchdb
Signed-off-by: Otavio Santana <[email protected]>
1 parent 529131a commit 031831b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

jnosql-couchdb/src/test/java/org/eclipse/jnosql/databases/couchdb/communication/DefaultCouchDBDocumentManagerTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,19 @@ void shouldUpdateNull(){
295295
});
296296
}
297297

298+
@Test
299+
void shouldInsertByteArray() {
300+
CommunicationEntity entity = CommunicationEntity.of("Failure");
301+
entity.add(CouchDBConstant.ID, "id");
302+
entity.add("data", new byte[]{'a','b','c','d'});
303+
var communication = entityManager.insert(entity);
304+
305+
SoftAssertions.assertSoftly(soft -> {
306+
soft.assertThat(communication).isNotNull();
307+
soft.assertThat(communication.find("data").get().get()).isInstanceOf(byte[].class);
308+
});
309+
}
310+
298311
private CommunicationEntity createDocumentList() {
299312
CommunicationEntity entity = CommunicationEntity.of("AppointmentBook");
300313
List<List<Element>> documents = new ArrayList<>();

0 commit comments

Comments
 (0)