Search in sources :

Example 1 with QuotaEmailTemplateListCmd

use of org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd in project cloudstack by apache.

the class QuotaResponseBuilderImplTest method testListQuotaEmailTemplates.

@Test
public void testListQuotaEmailTemplates() {
    QuotaEmailTemplateListCmd cmd = new QuotaEmailTemplateListCmd();
    cmd.setTemplateName("some name");
    List<QuotaEmailTemplatesVO> templates = new ArrayList<>();
    QuotaEmailTemplatesVO template = new QuotaEmailTemplatesVO();
    template.setTemplateName("template");
    templates.add(template);
    Mockito.when(quotaEmailTemplateDao.listAllQuotaEmailTemplates(Mockito.anyString())).thenReturn(templates);
    assertTrue(quotaResponseBuilder.listQuotaEmailTemplates(cmd).size() == 1);
}
Also used : QuotaEmailTemplateListCmd(org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd) QuotaEmailTemplatesVO(org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 QuotaEmailTemplateListCmd (org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd)1 QuotaEmailTemplatesVO (org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO)1 Test (org.junit.Test)1