use of org.finra.herd.model.api.xml.Storage in project herd by FINRAOS.
the class StorageServiceTest method testUpdateStorageAttributes.
@Test
public void testUpdateStorageAttributes() {
// Create and persist a valid storage.
StorageCreateRequest request = getNewStorageCreateRequest();
Storage storage = storageService.createStorage(request);
// Update attributes for the storage.
Storage result = storageService.updateStorageAttributes(new StorageKey(storage.getName()), new StorageAttributesUpdateRequest(businessObjectDefinitionServiceTestHelper.getNewAttributes2()));
// Validate the results.
assertEquals(new Storage(storage.getName(), storage.getStoragePlatformName(), businessObjectDefinitionServiceTestHelper.getNewAttributes2()), result);
}
use of org.finra.herd.model.api.xml.Storage in project herd by FINRAOS.
the class StorageServiceTest method testUpdateStorageAttributesRemoveAllAttributes.
@Test
public void testUpdateStorageAttributesRemoveAllAttributes() {
// Create and persist a valid storage.
StorageCreateRequest request = getNewStorageCreateRequest();
Storage storage = storageService.createStorage(request);
// Update attributes for the storage.
Storage result = storageService.updateStorageAttributes(new StorageKey(storage.getName()), new StorageAttributesUpdateRequest(NO_ATTRIBUTES));
// Validate the results.
assertEquals(new Storage(storage.getName(), storage.getStoragePlatformName(), NO_ATTRIBUTES), result);
}
use of org.finra.herd.model.api.xml.Storage in project herd by FINRAOS.
the class StorageServiceTest method testUpdateStorage.
@Test
public void testUpdateStorage() {
// Create a storage.
Storage storage = storageService.createStorage(getNewStorageCreateRequest());
// Update the storage.
// TODO: Update various attributes of the storage update request in the future when there is something to update.
Storage result = storageService.updateStorage(new StorageKey(storage.getName()), new StorageUpdateRequest());
// Validate the results.
// TODO: Add asserts to ensure fields that were update indeed got updated.
assertEquals(new Storage(storage.getName(), storage.getStoragePlatformName(), storage.getAttributes()), result);
}
use of org.finra.herd.model.api.xml.Storage in project herd by FINRAOS.
the class StorageServiceTest method testCreateStorage.
@Test
public void testCreateStorage() {
// Create and persist a valid storage.
StorageCreateRequest request = getNewStorageCreateRequest();
Storage result = storageService.createStorage(request);
// Validate the results.
assertEquals(new Storage(request.getName(), request.getStoragePlatformName(), request.getAttributes()), result);
}
use of org.finra.herd.model.api.xml.Storage in project herd by FINRAOS.
the class StorageServiceTest method testGetStorage.
@Test
public void testGetStorage() {
// Create and persist a valid storage.
Storage storage = storageService.createStorage(getNewStorageCreateRequest());
// Retrieve the storage by its name.
Storage result = storageService.getStorage(new StorageKey(storage.getName()));
// Validate the results.
assertEquals(storage, result);
}
Aggregations