HHH-6069: fixing test & adding toString() on the entity

This commit is contained in:
adamw 2011-04-19 17:26:52 +02:00
parent 255f2234e0
commit ddb79d1709
2 changed files with 14 additions and 2 deletions

View File

@ -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 +
'}';
}
}

View File

@ -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);