From 3585f131fb446c7b9f1f814741a5bdc58fdd7876 Mon Sep 17 00:00:00 2001 From: panbha Date: Sun, 14 Jun 2015 22:53:25 +0530 Subject: [PATCH] rpt --- .../ScenarioTests/AzureBackupTests.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTests.ps1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTests.ps1 index 3ed1a499ab83..e62b5b5c9813 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTests.ps1 +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTests.ps1 @@ -52,12 +52,14 @@ function GetAzureRecoveryPointTest $azureBackUpItem.DataSourceId = $DataSourceId $azureBackUpItem.Type = $DataSourceType $recoveryPoints = Get-AzureBackupRecoveryPoint -item $azureBackUpItem - Assert-NotNull $recoveryPoints 'Recovery Points should not be null' - foreach($recoveryPoint in $recoveryPoints) + if (!($recoveryPoints -eq $null)) { - Assert-NotNull $recoveryPoint.RecoveryPointTime 'RecoveryPointTime should not be null' - Assert-NotNull $recoveryPoint.RecoveryPointType 'RecoveryPointType should not be null' - Assert-NotNull $recoveryPoint.RecoveryPointId 'RecoveryPointId should not be null' + foreach($recoveryPoint in $recoveryPoints) + { + Assert-NotNull $recoveryPoint.RecoveryPointTime 'RecoveryPointTime should not be null' + Assert-NotNull $recoveryPoint.RecoveryPointType 'RecoveryPointType should not be null' + Assert-NotNull $recoveryPoint.RecoveryPointId 'RecoveryPointId should not be null' + } } }