Tidied up the object creation in tests.

This commit is contained in:
Conor Tolan
2019-02-23 17:41:23 +00:00
parent a95e01066d
commit f642290b2d
2 changed files with 49 additions and 33 deletions

View File

@@ -25,9 +25,7 @@ Describe "$functionName" -Tag 'Unit' {
$object = [PSCustomObject]@{}
$object | Add-Member -MemberType ScriptMethod -Name "list" -Value { $MockedList }
$MockedArray = @()
$MockedArray += $MockedList
$MockedArray += $MockedList
$MockedArray = @($MockedList, $MockedList)
Mock -CommandName Get-VMCService -MockWith { $object }