我想嘗試使用DBUnit進行單元測試,但是我的數據集有問題。Unitils/DBunit和數據庫測試
這裏是我的持久性對象:
@Entity
@Table(name = "personnes")
public class Personne implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer pk;
@Column
private String name;
}
而且我的數據集:
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
<personnes name="toto" pk="1" />
</dataset>
我的問題是,與名字列,我得到這個錯誤:
org.dbunit.dataset.NoSuchColumnException: personnes.NAME - (Non-uppercase input column: name) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive.
我不不明白爲什麼dbunit搜索列「NAME」,而我的列是「名稱」。
感謝您的幫助。
我有這個問題。你的問題可能與這個錯誤,這顯然已經存在相當一段時間... https://unitils.atlassian.net/browse/UNI-134 – Luke 2012-10-12 20:39:17