/** * 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(1, quotaStorageList.size(), "wrong number of quotas returned"); for (QuotaStorage group : quotaStorageList) { assertEquals(Guid.Empty, group.getStorageId(), "Storage ID should not be null in general mode"); assertNull(group.getStorageName(), "Storage name should not be null in general mode"); } }
/** * 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(1, quotaStorageList.size(), "wrong number of quotas returned"); for (QuotaStorage group : quotaStorageList) { assertNotNull(group.getStorageId(), "Storage ID should not be null in specific mode"); assertNotNull(group.getStorageName(), "Storage name should not be null in specific mode"); } }