Search in sources :

Example 1 with Citizen

use of org.eclipse.jnosql.mapping.document.entities.Citizen in project jnosql-diana by eclipse.

the class DefaultDocumentEntityConverterTest method shouldCreateLazilyEntity.

@Test
public void shouldCreateLazilyEntity() {
    DocumentEntity entity = DocumentEntity.of("Citizen");
    entity.add("id", "10");
    entity.add("name", "Salvador");
    Citizen citizen = converter.toEntity(entity);
    Assertions.assertNotNull(citizen);
    assertNull(citizen.getCity());
}
Also used : DocumentEntity(jakarta.nosql.document.DocumentEntity) Citizen(org.eclipse.jnosql.mapping.document.entities.Citizen) Test(org.junit.jupiter.api.Test)

Aggregations

DocumentEntity (jakarta.nosql.document.DocumentEntity)1 Citizen (org.eclipse.jnosql.mapping.document.entities.Citizen)1 Test (org.junit.jupiter.api.Test)1