I get the below error message when I un my test harness.
Can someone tell me what it is that I am doing wrong?
**************** Error Message ***************
INFO: Query language substitutions: {}
F
Time: 4.578
There was 1 failure:
1) test0001Load(com.db.gcp.lem.cds.test.data.DocTypeDAOTest)junit.framework.AssertionFailedError: expected:<1> but was:<0>
at com.db.gcp.lem.cds.test.data.DocTypeDAOTest.test0001Load(DocTypeDAOTest.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.db.gcp.lem.cds.test.data.DocTypeDAOTest.main(DocTypeDAOTest.java:19)
***************** Test Stub *******************
public class DocTypeDAOTest extends CDSHibernateTestBase{
private static Class CLASS = DocTypeDAOTest.class;
public static void main(String[] args)
{
String[] arr = {CLASS.getName()};
junit.textui.TestRunner.main(arr);
}
public void test0001Load() throws Exception {
assertNotNull(hibernateSession);
Query q = hibernateSession.createQuery("from com.db.gcp.lem.cds.data.DocTypeDAO doctype where doctype.documentationTypeID = :documentationTypeID") ;
q.setParameter("documentationTypeID",new Long(10000)) ;
assertEquals(1,q.list().size());
}
}
********* Data Access Object **************
package com.db.gcp.lem.cds.data;
import java.io.Serializable;
/**
* @author Mehran Zonouzi
* Date: 06-Jan-2004
* Time: 12:30:43
*/
/**
* @hibernate.class
* table="REFdocumentationtype"
* mutable="false"
* @hibernate.query
* name="getDocTypeQuery"
* query="from DocTypeDAO doctype where doctype.documentationTypeID = ?"
*/
public class DocTypeDAO implements Serializable
{
private Long documentationTypeID;
/**
* @hibernate.id
* column="DOCUMENTATIONTYPEID"
* generator-class="sequence"
* @hibernate.generator-param
* name="sequence"
* value="seq_doctype"
*/
public Long getDocumentationTypeID()
{
return documentationTypeID;
}
public void setDocumentationTypeID(Long documentationTypeID)
{
this.documentationTypeID = documentationTypeID;
}
private String description;
/**
* @hibernate.property coulmn="DESCRIPTION"
*/
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
private Double entryOrder;
/**
* @hibernate.property coulmn="ENTRYORDER"
*/
public Double getEntryOrder()
{
return entryOrder;
}
public void setEntryOrder(Double entryOrder)
{
this.entryOrder = entryOrder;
}
private String defaultInd;
/**
* @hibernate.property coulmn="DEFAULTIND"
*/
public String getDefaultInd()
{
return defaultInd;
}
public void setDefaultInd(String defaultInd)
{
this.defaultInd = defaultInd;
}
private String modifyDefaultInd;
/**
* @hibernate.property coulmn="MODIFYDEFAULTIND"
*/
public String getModifyDefaultInd()
{
return modifyDefaultInd;
}
public void setModifyDefaultInd(String modifyDefaultInd)
{
this.modifyDefaultInd = modifyDefaultInd;
}
}
|