Search in sources :

Example 1 with BaseActionForm

use of org.mifos.framework.struts.actionforms.BaseActionForm in project head by mifos.

the class ConvertionUtilTest method testPopulateBusinessObjectFail.

public void testPopulateBusinessObjectFail() throws Exception {
    try {
        BaseActionForm baseActionForm = new BaseActionForm();
        ConversionUtil.populateBusinessObject(baseActionForm, null, new Locale("EN"));
        Assert.fail();
    } catch (ValueObjectConversionException e) {
        Assert.assertEquals("exception.framework.SystemException.ValueObjectConversionException", e.getKey());
    }
    try {
        ConversionUtil.populateBusinessObject(null, null, new Locale("EN"));
        Assert.fail();
    } catch (ValueObjectConversionException e) {
        Assert.assertEquals("exception.framework.SystemException.ValueObjectConversionException", e.getKey());
    }
}
Also used : Locale(java.util.Locale) BaseActionForm(org.mifos.framework.struts.actionforms.BaseActionForm) ValueObjectConversionException(org.mifos.framework.exceptions.ValueObjectConversionException)

Aggregations

Locale (java.util.Locale)1 ValueObjectConversionException (org.mifos.framework.exceptions.ValueObjectConversionException)1 BaseActionForm (org.mifos.framework.struts.actionforms.BaseActionForm)1