use of org.ovirt.engine.core.bll.ValidationResult in project ovirt-engine by oVirt.
the class AttachStorageServerConnectionToStorageDomainCommandTest method validateFailureNotExists.
@Test
public void validateFailureNotExists() {
ValidationResult result = new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST);
when(validator.isConnectionExists()).thenReturn(result);
ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST);
}
use of org.ovirt.engine.core.bll.ValidationResult in project ovirt-engine by oVirt.
the class DetachStorageConnectionFromStorageDomainCommandTest method validateFailureNotExists.
@Test
public void validateFailureNotExists() {
ValidationResult result = new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST);
when(validator.isConnectionExists()).thenReturn(result);
ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST);
}
use of org.ovirt.engine.core.bll.ValidationResult in project ovirt-engine by oVirt.
the class SyncLunsInfoForBlockStorageDomainCommandTest method validateInvalidHost.
@Test
public void validateInvalidHost() {
when(hostValidator.hostExists()).thenReturn(new ValidationResult(EngineMessage.VDS_INVALID_SERVER_ID));
runAndAssertValidateFailure(command, EngineMessage.VDS_INVALID_SERVER_ID);
}
use of org.ovirt.engine.core.bll.ValidationResult in project ovirt-engine by oVirt.
the class UpdateStorageDomainCommandTest method validateFailsUnSupportedVersionForDiscardAfterDelete.
@Test
public void validateFailsUnSupportedVersionForDiscardAfterDelete() {
EngineMessage message = EngineMessage.ACTION_TYPE_FAILED_DISCARD_AFTER_DELETE_NOT_SUPPORTED_BY_DC_VERSION;
when(storageDomainValidator.isDiscardAfterDeleteSupportedByDcVersion(any())).thenReturn(new ValidationResult(message));
ValidateTestUtils.runAndAssertValidateFailure(cmd, message);
}
use of org.ovirt.engine.core.bll.ValidationResult in project ovirt-engine by oVirt.
the class UpdateStorageDomainCommandTest method validateFailsIllegalDiscardAfterDelete.
@Test
public void validateFailsIllegalDiscardAfterDelete() {
EngineMessage message = EngineMessage.ACTION_TYPE_FAILED_DISCARD_AFTER_DELETE_NOT_SUPPORTED_BY_UNDERLYING_STORAGE;
when(storageDomainValidator.isDiscardAfterDeleteLegalForExistingStorageDomain()).thenReturn(new ValidationResult(message));
ValidateTestUtils.runAndAssertValidateFailure(cmd, message);
}
Aggregations