16
16
using Microsoft . Azure . ServiceManagemenet . Common . Models ;
17
17
using Microsoft . Azure . Test . HttpRecorder ;
18
18
using Microsoft . WindowsAzure . Commands . ScenarioTest ;
19
+ using Microsoft . WindowsAzure . Commands . Utilities . Common ;
19
20
using Xunit ;
20
21
using Xunit . Abstractions ;
21
22
@@ -38,7 +39,7 @@ public void TestListDatabaseRestorePoints()
38
39
public void TestRestoreGeoBackup ( )
39
40
{
40
41
// Test cannot be re-recorded because it has hardcoded server name
41
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
42
+ if ( TestMockSupport . RunningMocked )
42
43
{
43
44
RunPowerShellTest ( "Test-RestoreGeoBackup" ) ;
44
45
}
@@ -48,7 +49,7 @@ public void TestRestoreGeoBackup()
48
49
public void TestRestoreDeletedDatabaseBackup ( )
49
50
{
50
51
// Test cannot be re-recorded because it has hardcoded server name
51
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
52
+ if ( TestMockSupport . RunningMocked )
52
53
{
53
54
RunPowerShellTest ( "Test-RestoreDeletedDatabaseBackup" ) ;
54
55
}
@@ -58,7 +59,7 @@ public void TestRestoreDeletedDatabaseBackup()
58
59
public void TestRestorePointInTimeBackup ( )
59
60
{
60
61
// Test cannot be re-recorded because it has hardcoded server name
61
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
62
+ if ( TestMockSupport . RunningMocked )
62
63
{
63
64
RunPowerShellTest ( "Test-RestorePointInTimeBackup" ) ;
64
65
}
@@ -68,7 +69,7 @@ public void TestRestorePointInTimeBackup()
68
69
public void TestServerBackupLongTermRetentionVault ( )
69
70
{
70
71
// Test cannot be re-recorded because it has hardcoded server name
71
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
72
+ if ( TestMockSupport . RunningMocked )
72
73
{
73
74
RunPowerShellTest ( "Test-ServerBackupLongTermRetentionVault" ) ;
74
75
}
@@ -78,7 +79,7 @@ public void TestServerBackupLongTermRetentionVault()
78
79
public void TestDatabaseBackupLongTermRetentionPolicy ( )
79
80
{
80
81
// Test cannot be re-recorded because it has hardcoded server name
81
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
82
+ if ( TestMockSupport . RunningMocked )
82
83
{
83
84
RunPowerShellTest ( "Test-DatabaseBackupLongTermRetentionPolicy" ) ;
84
85
}
@@ -88,7 +89,7 @@ public void TestDatabaseBackupLongTermRetentionPolicy()
88
89
public void TestRestoreLongTermRetentionBackup ( )
89
90
{
90
91
// Test cannot be re-recorded because it has hardcoded server name
91
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
92
+ if ( TestMockSupport . RunningMocked )
92
93
{
93
94
RunPowerShellTest ( "Test-RestoreLongTermRetentionBackup" ) ;
94
95
}
@@ -98,7 +99,7 @@ public void TestRestoreLongTermRetentionBackup()
98
99
public void TestDatabaseGeoBackupPolicy ( )
99
100
{
100
101
// Test cannot be re-recorded because it has hardcoded server name
101
- if ( HttpMockServer . Mode == HttpRecorderMode . Playback )
102
+ if ( TestMockSupport . RunningMocked )
102
103
{
103
104
RunPowerShellTest ( "Test-DatabaseGeoBackupPolicy" ) ;
104
105
}
0 commit comments