Unit testing a public IP address

The next script is for testing a deployed public IP address. The test cases are for validating a successful deployment and allocation method—dynamic or static. This code file is available with the accompanied code file, chapter-6 - listing7.txt

     Context "Public IP address from template deployment" {
It "The public IP address resource Have been deployed successfully" {
[string]$publicIP.provisioningState | Should Be "Succeeded"
}
It "The Public IP address is allocation dynamic IP address" {
[string]$publicIP.publicIPAllocationMethod | Should Be "Dynamic"
}
}