HHH-6069: fixing test & adding toString() on the entity
This commit is contained in:
parent
255f2234e0
commit
ddb79d1709
|
@ -2,7 +2,10 @@ package org.hibernate.envers.test.integration.naming.quotation;
|
|||
|
||||
import org.hibernate.envers.Audited;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
|
@ -80,4 +83,13 @@ public class QuotedFieldsEntity {
|
|||
result = 31 * result + (data2 != null ? data2.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "QuotedFieldsEntity{" +
|
||||
"id=" + id +
|
||||
", data1='" + data1 + '\'' +
|
||||
", data2=" + data2 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class QuotedFieldsTest extends AbstractEntityTest {
|
|||
|
||||
@Test
|
||||
public void testHistoryOfId1() {
|
||||
QuotedFieldsEntity ver1 = new QuotedFieldsEntity(qfeId1, "data2", 1);
|
||||
QuotedFieldsEntity ver1 = new QuotedFieldsEntity(qfeId1, "data1", 1);
|
||||
QuotedFieldsEntity ver2 = new QuotedFieldsEntity(qfeId1, "data1 changed", 1);
|
||||
|
||||
assert getAuditReader().find(QuotedFieldsEntity.class, qfeId1, 1).equals(ver1);
|
||||
|
|
Loading…
Reference in New Issue