Exemplo n.º 1
0
 /**
  * Test get Quota by Name, with name of specific Quota.
  *
  * @throws Exception
  */
 @Test
 public void testGetQuotaByExistingName() throws Exception {
   Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName("Quota General");
   assertEquals(
       dao.getById(FixturesTool.QUOTA_GENERAL)
           .getQuotaName()
           .equals(quotaGeneralToSpecific.getQuotaName()),
       true);
   assertEquals(
       dao.getById(FixturesTool.QUOTA_GENERAL).getId().equals(quotaGeneralToSpecific.getId()),
       true);
 }
Exemplo n.º 2
0
 /**
  * Test get Quota by Name, with not existing name.
  *
  * @throws Exception
  */
 @Test
 public void testGetQuotaWithNoExistingName() throws Exception {
   Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName("Any name");
   assertEquals(null, quotaGeneralToSpecific);
 }
Exemplo n.º 3
0
 /**
  * Test get Quota by Name, with name that does not exist for the storage pool.
  *
  * @throws Exception
  */
 @Test
 public void testGetQuotaByExistingNameWIthNoMatchingStoragePool() throws Exception {
   Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName("Quota General2");
   assertEquals(null, quotaGeneralToSpecific);
 }