Skip to content

Commit 60b3d2d

Browse files
committed
feat: update contact entity at cassandra
Signed-off-by: Otavio Santana <[email protected]>
1 parent bd62173 commit 60b3d2d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

jnosql-cassandra/src/test/java/org/eclipse/jnosql/databases/cassandra/mapping/CassandraColumnEntityConverterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public void shouldSupportUDT() {
289289
contact.setHome(address);
290290

291291
var entity = converter.toCommunication(contact);
292-
assertEquals("Person", entity.name());
292+
assertEquals("Contact", entity.name());
293293
Element column = entity.find("home").get();
294294
UDT udt = UDT.class.cast(column);
295295

@@ -303,7 +303,7 @@ public void shouldSupportUDT() {
303303

304304
@Test
305305
public void shouldSupportUDTToEntity() {
306-
var entity = CommunicationEntity.of("Person");
306+
var entity = CommunicationEntity.of("Contact");
307307
entity.add(Element.of("name", "Poliana"));
308308
entity.add(Element.of("age", 20));
309309
List<Element> columns = asList(Element.of("city", "Salvador"),

jnosql-cassandra/src/test/java/org/eclipse/jnosql/databases/cassandra/mapping/DefaultCassandraTemplateTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void setUp() {
9090

9191
@Test
9292
void shouldSaveConsistency() {
93-
var entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
93+
var entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
9494
entity.addNull("home");
9595
ArgumentCaptor<CommunicationEntity> captor = ArgumentCaptor.forClass(CommunicationEntity.class);
9696

@@ -112,7 +112,7 @@ void shouldSaveConsistency() {
112112

113113
@Test
114114
void shouldSaveConsistencyIterable() {
115-
CommunicationEntity entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
115+
CommunicationEntity entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
116116
entity.addNull("home");
117117
ArgumentCaptor<CommunicationEntity> captor = ArgumentCaptor.forClass(CommunicationEntity.class);
118118

@@ -134,7 +134,7 @@ void shouldSaveConsistencyIterable() {
134134
@Test
135135
void shouldSaveConsistencyDuration() {
136136
Duration duration = Duration.ofHours(2);
137-
CommunicationEntity entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
137+
CommunicationEntity entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
138138
entity.addNull("home");
139139
ArgumentCaptor<CommunicationEntity> captor = ArgumentCaptor.forClass(CommunicationEntity.class);
140140

@@ -156,7 +156,7 @@ void shouldSaveConsistencyDuration() {
156156
@Test
157157
void shouldSaveConsistencyDurationIterable() {
158158
Duration duration = Duration.ofHours(2);
159-
CommunicationEntity entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
159+
CommunicationEntity entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
160160
entity.addNull("home");
161161
ArgumentCaptor<CommunicationEntity> captor = ArgumentCaptor.forClass(CommunicationEntity.class);
162162

@@ -190,7 +190,7 @@ void shouldFind() {
190190
contact.setName("Name");
191191
contact.setAge(20);
192192

193-
CommunicationEntity entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
193+
CommunicationEntity entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
194194
SelectQuery query = select().from("columnFamily").build();
195195
ConsistencyLevel level = ConsistencyLevel.THREE;
196196
when(manager.select(query, level)).thenReturn(Stream.of(entity));
@@ -205,7 +205,7 @@ void shouldFindCQL() {
205205
contact.setName("Name");
206206
contact.setAge(20);
207207
String cql = "select * from Person";
208-
CommunicationEntity entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
208+
CommunicationEntity entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
209209

210210
when(manager.cql(cql)).thenReturn(Stream.of(entity));
211211

@@ -215,11 +215,11 @@ void shouldFindCQL() {
215215

216216
@Test
217217
void shouldFindSimpleStatement() {
218-
SimpleStatement statement = QueryBuilder.selectFrom("Person").all().build();
218+
SimpleStatement statement = QueryBuilder.selectFrom("Contact").all().build();
219219
Contact contact = new Contact();
220220
contact.setName("Name");
221221
contact.setAge(20);
222-
CommunicationEntity entity = CommunicationEntity.of("Person", asList(Element.of("name", "Name"), Element.of("age", 20)));
222+
CommunicationEntity entity = CommunicationEntity.of("Contact", asList(Element.of("name", "Name"), Element.of("age", 20)));
223223

224224
when(manager.execute(statement)).thenReturn(Stream.of(entity));
225225

0 commit comments

Comments
 (0)