Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Aug 25, 2021
1 parent 2be61dd commit 4040dfa
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,22 @@ try

Mock -CommandName Get-SPServiceApplication -MockWith {
$spServiceApp = [PSCustomObject]@{
TypeName = "Search Service Application"
DisplayName = $testParams.Name
Name = $testParams.Name
ApplicationPool = @{ Name = $testParams.ApplicationPool }
Database = @{
TypeName = "Search Service Application"
DisplayName = $testParams.Name
Name = $testParams.Name
ApplicationPool = @{ Name = $testParams.ApplicationPool }
Database = @{
Name = $testParams.DatabaseName
NormalizedDataSource = 'SQL01'
}
SearchAdminDatabase = @{
SearchAdminDatabase = @{
Name = $testParams.DatabaseName
NormalizedDataSource = 'SQL01'
}
AnalyticsReportingDatabases = @{
Name = $testParams.DatabaseName + '_AnalyticsReportingStore'
NormalizedDataSource = 'SQL01'
}
}
$spServiceApp = $spServiceApp | Add-Member -MemberType ScriptMethod -Name GetType -Value {
return @{ FullName = $getTypeFullName }
Expand Down

0 comments on commit 4040dfa

Please sign in to comment.