예제 #1
0
 /**
  * Asserts that when {@link QuotaDAO#getQuotaStorageByQuotaGuidWithGeneralDefault(Guid)} is called
  * with an empty quota, no storage quotas are returned
  */
 @Test
 public void testQuotaStorageByQuotaGuidWitheGeneralDefaultWithEmpty() {
   List<QuotaStorage> quotaStorageList =
       dao.getQuotaStorageByQuotaGuidWithGeneralDefault(FixturesTool.QUOTA_EMPTY);
   assertNotNull(quotaStorageList);
   assertEquals("wrong number of quotas returned", 0, quotaStorageList.size());
 }
예제 #2
0
 /**
  * Asserts that when {@link QuotaDAO#getQuotaStorageByQuotaGuidWithGeneralDefault(Guid)} is called
  * with a specific quota, all the relevant storages are returned
  */
 @Test
 public void testQuotaStorageByQuotaGuidWithGeneralDefaultNoDefault() {
   List<QuotaStorage> quotaStorageList =
       dao.getQuotaStorageByQuotaGuidWithGeneralDefault(FixturesTool.QUOTA_SPECIFIC);
   assertNotNull(quotaStorageList);
   assertEquals("wrong number of quotas returned", 1, quotaStorageList.size());
   for (QuotaStorage group : quotaStorageList) {
     assertNotNull("Storage ID should not be null in specific mode", group.getStorageId());
     assertNotNull("Storage name should not be null in specific mode", group.getStorageName());
   }
 }
예제 #3
0
 /**
  * Asserts that when {@link QuotaDAO#getQuotaStorageByQuotaGuidWithGeneralDefault(Guid)} is called
  * with a specific quota, all the relevant VDSs are returned
  */
 @Test
 public void testQuotaStorageByQuotaGuidWithGeneralDefaultWithDefault() {
   List<QuotaStorage> quotaStorageList =
       dao.getQuotaStorageByQuotaGuidWithGeneralDefault(FixturesTool.DEFAULT_QUOTA_GENERAL);
   assertNotNull(quotaStorageList);
   assertEquals("wrong number of quotas returned", 1, quotaStorageList.size());
   for (QuotaStorage group : quotaStorageList) {
     assertEquals(
         "Storage ID should not be null in general mode", Guid.Empty, group.getStorageId());
     assertNull("Storage name should not be null in general mode", group.getStorageName());
   }
 }