Skip to content

Commit c651f85

Browse files
committed
feat: fix mongodb
Signed-off-by: Otavio Santana <[email protected]>
1 parent 184e6dc commit c651f85

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jnosql-orientdb/src/test/java/org/eclipse/jnosql/databases/orientdb/mapping/OrientDBDocumentRepositoryProxyTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ public void shouldSaveUsingUpdate() {
114114
var person = new Person();
115115
person.setName("Ada-2");
116116
person.setAge(10);
117-
when(template.find(Person.class, "Ada-2")).thenReturn(Optional.of(person));
117+
person.setId(10L);
118+
when(template.find(Person.class, 10L)).thenReturn(Optional.of(person));
118119
personRepository.save(person);
119120
verify(template).update(eq(person));
120121
}
@@ -132,8 +133,9 @@ public void shouldDeleteEntity(){
132133
var person = new Person();
133134
person.setName("Ada");
134135
person.setAge(10);
136+
person.setId(10L);
135137
personRepository.delete(person);
136-
verify(template).delete(Person.class, person.getName());
138+
verify(template).delete(Person.class, person.getId());
137139
}
138140

139141
interface PersonRepository extends OrientDBCrudRepository<Person, String> {

0 commit comments

Comments
 (0)