Fix C# tests for ValidateSetValuesGenerator (#4253)

This commit is contained in:
Ilya 2017-07-15 00:02:58 +04:00 committed by Dongbo Wang
parent 7fa0dd0549
commit 23c9b934ef

View file

@ -290,9 +290,12 @@ Describe 'ValidateSet support a dynamically generated set' -Tag "CI" {
}
'@
$testAssemply = "$TestDrive\tst-$(New-Guid).dll"
Add-Type -TypeDefinition $a -OutputAssembly $testAssemply
Import-Module $testAssemply
$cls = Add-Type -TypeDefinition $a -PassThru | select -First 1
$testModule = Import-Module $cls.Assembly -PassThru
}
AfterAll {
Remove-Module -ModuleInfo $testModule
}
It 'Throw if IValidateSetValuesGenerator is not implemented' {
@ -433,7 +436,7 @@ Describe 'ValidateSet support a dynamically generated set' -Tag "CI" {
[GenValuesWithExpiration]::temp = $true
return [string[]]("Test1","TestString2","Test2")
}
}
}