fix assert
This commit is contained in:
parent
0bf3102188
commit
796277bdaa
|
@ -11,7 +11,8 @@ import org.junit.Test;
|
||||||
import com.baeldung.hibernate.HibernateUtil;
|
import com.baeldung.hibernate.HibernateUtil;
|
||||||
import com.baeldung.hibernate.pojo.Person;
|
import com.baeldung.hibernate.pojo.Person;
|
||||||
import com.baeldung.hibernate.pojo.PersonName;
|
import com.baeldung.hibernate.pojo.PersonName;
|
||||||
import com.vividsolutions.jts.util.Assert;
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class PersonNameConverterTest {
|
public class PersonNameConverterTest {
|
||||||
|
|
||||||
|
@ -58,15 +59,15 @@ public class PersonNameConverterTest {
|
||||||
.setParameter("id", id)
|
.setParameter("id", id)
|
||||||
.getSingleResult();
|
.getSingleResult();
|
||||||
|
|
||||||
Assert.equals(surname + ", " + name, dbPersonName);
|
assertEquals(surname + ", " + name, dbPersonName);
|
||||||
|
|
||||||
Person dbPerson = session.createNativeQuery("select * from PersonTable p where p.id = :id", Person.class)
|
Person dbPerson = session.createNativeQuery("select * from PersonTable p where p.id = :id", Person.class)
|
||||||
.setParameter("id", id)
|
.setParameter("id", id)
|
||||||
.getSingleResult();
|
.getSingleResult();
|
||||||
|
|
||||||
Assert.equals(dbPerson.getPersonName()
|
assertEquals(dbPerson.getPersonName()
|
||||||
.getName(), name);
|
.getName(), name);
|
||||||
Assert.equals(dbPerson.getPersonName()
|
assertEquals(dbPerson.getPersonName()
|
||||||
.getSurname(), surname);
|
.getSurname(), surname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue