Example usage for org.hibernate PropertyValueException getEntityName

List of usage examples for org.hibernate PropertyValueException getEntityName

Introduction

In this page you can find the example usage for org.hibernate PropertyValueException getEntityName.

Prototype

public String getEntityName() 

Source Link

Usage

From source file:cz.nkp.urnnbn.processmanager.persistence.ProcessDAOImplTest.java

License:Open Source License

public void testSaveProcessEmptyLogin() {
    Process process = buildProcess();
    process.setOwnerLogin(null);/*from w w w  . j a v a2  s . c o m*/
    try {
        dao.saveProcess(process);
        fail();
    } catch (PropertyValueException e) {
        assertEquals(Process.class.getName(), e.getEntityName());
        assertEquals("ownerLogin", e.getPropertyName());
    }
}

From source file:cz.nkp.urnnbn.processmanager.persistence.ProcessDAOImplTest.java

License:Open Source License

public void testSaveProcessEmptyType() {
    Process process = buildProcess();
    process.setType(null);/*from   w ww .j a va2  s  .c om*/
    try {
        dao.saveProcess(process);
        fail();
    } catch (PropertyValueException e) {
        assertEquals(Process.class.getName(), e.getEntityName());
        assertEquals("type", e.getPropertyName());
    }
}

From source file:cz.nkp.urnnbn.processmanager.persistence.ProcessDAOImplTest.java

License:Open Source License

public void testSaveProcessEmptyState() {
    Process process = buildProcess();
    process.setState(null);//from  ww w  .j a  va 2s  .  c  o  m
    try {
        dao.saveProcess(process);
        fail();
    } catch (PropertyValueException e) {
        assertEquals(Process.class.getName(), e.getEntityName());
        assertEquals("state", e.getPropertyName());
    }
}

From source file:cz.nkp.urnnbn.processmanager.persistence.XmlTransformationDAOImplTest.java

License:Open Source License

public void testSaveTransformationEmptyLogin() {
    XmlTransformation saved = dao.saveTransformation(buildTransformation());
    saved.setOwnerLogin(null);//  ww w  . j  a v a 2 s  .  co m
    try {
        dao.saveTransformation(saved);
        fail();
    } catch (PropertyValueException e) {
        assertEquals(XmlTransformation.class.getName(), e.getEntityName());
        assertEquals("ownerLogin", e.getPropertyName());
    }
}

From source file:cz.nkp.urnnbn.processmanager.persistence.XmlTransformationDAOImplTest.java

License:Open Source License

public void testSaveTransformationEmptyName() {
    XmlTransformation saved = dao.saveTransformation(buildTransformation());
    saved.setName(null);//from   w w w . j  av  a2  s.c  o m
    try {
        dao.saveTransformation(saved);
        fail();
    } catch (PropertyValueException e) {
        assertEquals(XmlTransformation.class.getName(), e.getEntityName());
        assertEquals("name", e.getPropertyName());
    }
}

From source file:cz.nkp.urnnbn.processmanager.persistence.XmlTransformationDAOImplTest.java

License:Open Source License

public void testSaveTransformationEmptyXslt() {
    XmlTransformation saved = dao.saveTransformation(buildTransformation());
    saved.setXslt(null);/*from   w w  w.  j ava 2 s  .c o m*/
    try {
        dao.saveTransformation(saved);
        fail();
    } catch (PropertyValueException e) {
        assertEquals(XmlTransformation.class.getName(), e.getEntityName());
        assertEquals("xslt", e.getPropertyName());
    }
}