Skip to content

Commit

Permalink
Fix Compare-ResourcePropertyState tests
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Guardian committed Apr 19, 2020
1 parent b08ae2e commit 9afe27e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/Unit/ActiveDirectoryDsc.Common.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1427,14 +1427,14 @@ InModuleScope 'ActiveDirectoryDsc.Common' {

$compareTargetResourceStateResult = Compare-ResourcePropertyState @compareTargetResourceStateParameters
$compareTargetResourceStateResult | Should -HaveCount 2
$compareTargetResourceStateResult[0].ParameterName | Should -Be 'ComputerName'
$compareTargetResourceStateResult[0].Expected | Should -Be 'DC01'
$compareTargetResourceStateResult[0].Actual | Should -Be 'DC01'
$compareTargetResourceStateResult[0].InDesiredState | Should -BeTrue
$compareTargetResourceStateResult[1].ParameterName | Should -Be 'Location'
$compareTargetResourceStateResult[1].Expected | Should -Be 'Sweden'
$compareTargetResourceStateResult[1].Actual | Should -Be 'Sweden'
$compareTargetResourceStateResult[1].InDesiredState | Should -BeTrue
$computerNameResult = $compareTargetResourceStateResult | Where-Object -Property ParameterName -eq 'ComputerName'
$computerNameResult.Expected | Should -Be 'DC01'
$computerNameResult.Actual | Should -Be 'DC01'
$computerNameResult.InDesiredState | Should -BeTrue
$locationNameResult = $compareTargetResourceStateResult | Where-Object -Property ParameterName -eq 'Location'
$locationNameResult.Expected | Should -Be 'Sweden'
$locationNameResult.Actual | Should -Be 'Sweden'
$locationNameResult.InDesiredState | Should -BeTrue
}
}

Expand Down Expand Up @@ -1485,14 +1485,14 @@ InModuleScope 'ActiveDirectoryDsc.Common' {

$compareTargetResourceStateResult = Compare-ResourcePropertyState @compareTargetResourceStateParameters
$compareTargetResourceStateResult | Should -HaveCount 2
$compareTargetResourceStateResult[0].ParameterName | Should -Be 'ComputerName'
$compareTargetResourceStateResult[0].Expected | Should -Be 'DC01'
$compareTargetResourceStateResult[0].Actual | Should -Be 'DC01'
$compareTargetResourceStateResult[0].InDesiredState | Should -BeTrue
$compareTargetResourceStateResult[1].ParameterName | Should -Be 'Location'
$compareTargetResourceStateResult[1].Expected | Should -Be 'Europe'
$compareTargetResourceStateResult[1].Actual | Should -Be 'Sweden'
$compareTargetResourceStateResult[1].InDesiredState | Should -BeFalse
$computerNameResult = $compareTargetResourceStateResult | Where-Object -Property ParameterName -eq 'ComputerName'
$computerNameResult.Expected | Should -Be 'DC01'
$computerNameResult.Actual | Should -Be 'DC01'
$computerNameResult.InDesiredState | Should -BeTrue
$locationNameResult = $compareTargetResourceStateResult | Where-Object -Property ParameterName -eq 'Location'
$locationNameResult.Expected | Should -Be 'Europe'
$locationNameResult.Actual | Should -Be 'Sweden'
$locationNameResult.InDesiredState | Should -BeFalse
}
}

Expand Down

0 comments on commit 9afe27e

Please sign in to comment.