Skip to content

Commit

Permalink
[dsccommunity#1258] Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bozho committed May 6, 2019
1 parent bb54481 commit b1c2f91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/Unit/MSFT_SqlRS.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ try

Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter {
$MethodName -eq 'InitializeReportServer'
} -Exactly -Times 0 -Scope It
} -Exactly -Times 1 -Scope It

Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter {
$MethodName -eq 'SetDatabaseConnection'
Expand Down Expand Up @@ -405,7 +405,7 @@ try
$MethodName -eq 'ReserveUrl' -and $Arguments.Application -eq $mockReportsApplicationName
} -Exactly -Times 1 -Scope It

Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 2 -Scope It
Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 3 -Scope It
Assert-MockCalled -CommandName Invoke-Sqlcmd -Exactly -Times 2 -Scope It
Assert-MockCalled -CommandName Restart-ReportingServicesService -Exactly -Times 1 -Scope It
}
Expand Down Expand Up @@ -657,7 +657,7 @@ try

Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter {
$MethodName -eq 'InitializeReportServer'
} -Exactly -Times 0 -Scope It
} -Exactly -Times 1 -Scope It

Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter {
$MethodName -eq 'SetDatabaseConnection'
Expand Down Expand Up @@ -687,7 +687,7 @@ try
$MethodName -eq 'ReserveUrl' -and $Arguments.Application -eq $mockReportsApplicationNameLegacy
} -Exactly -Times 1 -Scope It

Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 2 -Scope It
Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 3 -Scope It
Assert-MockCalled -CommandName Invoke-Sqlcmd -Exactly -Times 2 -Scope It
Assert-MockCalled -CommandName Restart-ReportingServicesService -Exactly -Times 1 -Scope It
}
Expand Down

0 comments on commit b1c2f91

Please sign in to comment.