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);
}
Aggregations