Skip to content

Commit c400d1b

Browse files
committed
enabled LongEntityRepositoryTest
1 parent 4f0f350 commit c400d1b

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/test/java/com/arangodb/springframework/debug/repository/LongEntityRepositoryTest.java

-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
import com.arangodb.springframework.AbstractArangoTest;
2424
import com.arangodb.springframework.debug.repository.entity.LongEntity;
25-
import org.junit.Ignore;
2625
import org.junit.Test;
2726
import org.springframework.beans.factory.annotation.Autowired;
2827

@@ -40,7 +39,6 @@ public class LongEntityRepositoryTest extends AbstractArangoTest {
4039
private LongEntityRepository repo;
4140

4241
@Test
43-
@Ignore
4442
public void save() {
4543
LongEntity entity = new LongEntity();
4644
entity.setId(1L);

src/test/java/com/arangodb/springframework/debug/repository/entity/LongEntity.java

+25
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import com.arangodb.springframework.annotation.Document;
2424
import org.springframework.data.annotation.Id;
2525

26+
import java.util.Objects;
27+
2628
/**
2729
* @author Michele Rastelli
2830
*/
@@ -52,4 +54,27 @@ public Long getValue() {
5254
public void setValue(Long value) {
5355
this.value = value;
5456
}
57+
58+
@Override
59+
public boolean equals(Object o) {
60+
if (this == o) return true;
61+
if (o == null || getClass() != o.getClass()) return false;
62+
LongEntity that = (LongEntity) o;
63+
return Objects.equals(id, that.id) &&
64+
Objects.equals(value, that.value);
65+
}
66+
67+
@Override
68+
public int hashCode() {
69+
return Objects.hash(id, value);
70+
}
71+
72+
@Override
73+
public String toString() {
74+
return "LongEntity{" +
75+
"id=" + id +
76+
", value=" + value +
77+
'}';
78+
}
79+
5580
}

0 commit comments

Comments
 (0)