Skip to content

Commit

Permalink
Updates to support pipeline
Browse files Browse the repository at this point in the history
Added example
Updated test
  • Loading branch information
jonathanmedd committed Apr 11, 2018
1 parent 6b3807d commit 2bdb20c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@
.EXAMPLE
Get-vRABlueprint -Name "Blueprint01","Blueprint02"
.EXAMPLE
Get-vRABlueprint -Name "Blueprint01","Blueprint02" -ExtendedProperties
#>
[CmdletBinding(DefaultParameterSetName="Standard")][OutputType('System.Management.Automation.PSObject')]

Param (

[parameter(Mandatory=$true,ValueFromPipeline=$false,ParameterSetName="ById")]
[parameter(Mandatory=$true,ValueFromPipeline=$true,ParameterSetName="ById")]
[ValidateNotNullOrEmpty()]
[String[]]$Id,

Expand Down
6 changes: 6 additions & 0 deletions tests/Test006-BlueprintAndServiceBlueprint.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Describe -Name 'Blueprint Tests' -Fixture {
$BlueprintA.Name | Should Be $JSON.Blueprint.Name
}

It -Name "Return named Blueprint $($JSON.Blueprint.Name) Extended Properties" -Test {

$BlueprintB = Get-vRABlueprint -Name $JSON.Blueprint.Name -ExtendedProperties
$BlueprintB.ExternalId | Should BeOfType System.String
}

It -Name "Return named Service Blueprint $($JSON.ServiceBlueprint.Name)" -Test {

$ServiceBlueprintA = Get-vRAServiceBlueprint -Name $JSON.ServiceBlueprint.Name
Expand Down

0 comments on commit 2bdb20c

Please sign in to comment.