예제 #1
0
 /**
  * Asserts that when {@link QuotaDAO#getQuotaVdsGroupByQuotaGuidWithGeneralDefault(Guid)} is
  * called with an empty quota, no vds quotas are returned
  */
 @Test
 public void testQuotaVdsGroupByQuotaGuidWithGeneralDefaultWithEmpty() {
   List<QuotaVdsGroup> quotaVdsGroupList =
       dao.getQuotaVdsGroupByQuotaGuidWithGeneralDefault(FixturesTool.QUOTA_EMPTY);
   assertNotNull(quotaVdsGroupList);
   assertEquals("wrong number of quotas returned", 0, quotaVdsGroupList.size());
 }
예제 #2
0
 /**
  * Asserts that when {@link QuotaDAO#getQuotaVdsGroupByQuotaGuidWithGeneralDefault(Guid)} is
  * called with a non-specific quota, the general is returned
  */
 @Test
 public void testQuotaVdsGroupByQuotaGuidWithGeneralDefaultWithDefault() {
   List<QuotaVdsGroup> quotaVdsGroupList =
       dao.getQuotaVdsGroupByQuotaGuidWithGeneralDefault(FixturesTool.QUOTA_GENERAL);
   assertNotNull(quotaVdsGroupList);
   assertEquals("wrong number of quotas returned", 1, quotaVdsGroupList.size());
   for (QuotaVdsGroup group : quotaVdsGroupList) {
     assertEquals("VDS ID should be empty in general mode", Guid.Empty, group.getVdsGroupId());
     assertNull("VDS name should be null in general mode", group.getVdsGroupName());
   }
 }
예제 #3
0
 /**
  * Asserts that when {@link QuotaDAO#getQuotaVdsGroupByQuotaGuidWithGeneralDefault(Guid)} is
  * called with a specific quota, all the relevant VDSs are returned
  */
 @Test
 public void testQuotaVdsGroupByQuotaGuidWithGeneralDefaultNoDefault() {
   List<QuotaVdsGroup> quotaVdsGroupList =
       dao.getQuotaVdsGroupByQuotaGuidWithGeneralDefault(FixturesTool.QUOTA_SPECIFIC);
   assertNotNull(quotaVdsGroupList);
   assertEquals("wrong number of quotas returned", 2, quotaVdsGroupList.size());
   for (QuotaVdsGroup group : quotaVdsGroupList) {
     assertNotNull("VDS ID should not be null in specific mode", group.getVdsGroupId());
     assertNotNull("VDS name should not be null in specific mode", group.getVdsGroupName());
   }
 }