From fb45693fb19e8ac2851bdfa7a7aa08fb94201a8d Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sat, 11 Apr 2020 22:35:23 -0400 Subject: [PATCH] Pester 5 Prep --- Tests/Private/Get-ZertoApiFilter.Tests.ps1 | 4 ++-- Tests/Public/Add-ZertoPeerSite.Tests.ps1 | 6 +++--- Tests/Public/Connect-ZertoAnalytics.Tests.ps1 | 3 --- Tests/Public/Connect-ZertoServer.Tests.ps1 | 8 ++++---- Tests/Public/Get-ZAAlert.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZADatastore.Tests.ps1 | 6 +++--- Tests/Public/Get-ZAEvent.Tests.ps1 | 12 ++++++------ Tests/Public/Get-ZAJournalAverageHistory.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZAJournalAverageSize.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZAJournalBreach.Tests.ps1 | 6 +++--- Tests/Public/Get-ZAJournalHistoryStat.Tests.ps1 | 6 +++--- .../Public/Get-ZAJournalSiteAverageHistory.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZAJournalSiteAverageSize.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZAJournalSiteHistoryStat.Tests.ps1 | 10 +++++----- .../Public/Get-ZAJournalSiteHistorySummary.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZAJournalSiteSizeStat.Tests.ps1 | 10 +++++----- Tests/Public/Get-ZAJournalStatusProportion.Tests.ps1 | 6 +++--- Tests/Public/Get-ZAJournalStorageStat.Tests.ps1 | 6 +++--- Tests/Public/Get-ZAJournalSummary.Tests.ps1 | 6 +++--- Tests/Public/Get-ZANetworkSiteAverageIOPS.Tests.ps1 | 6 +++--- .../Get-ZANetworkSiteAveragePerformance.Tests.ps1 | 6 +++--- Tests/Public/Get-ZANetworkSiteStat.Tests.ps1 | 2 +- Tests/Public/Get-ZANetworkSiteSummary.Tests.ps1 | 2 +- Tests/Public/Get-ZANetworkVpgAverageIOPS.Tests.ps1 | 6 +++--- .../Get-ZANetworkVpgAveragePerformance.Tests.ps1 | 6 +++--- Tests/Public/Get-ZANetworkVpgStat.Tests.ps1 | 2 +- Tests/Public/Get-ZANetworkVpgSummary.Tests.ps1 | 2 +- .../Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 | 2 +- .../Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 | 2 +- Tests/Public/Get-ZAPlannerSite.Tests.ps1 | 2 +- Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 | 2 +- Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 | 2 +- Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 | 2 +- Tests/Public/Get-ZARPOAccountAverage.Tests.ps1 | 2 +- Tests/Public/Get-ZARPOAverage.Tests.ps1 | 6 +++--- Tests/Public/Get-ZARPOBreach.Tests.ps1 | 2 +- Tests/Public/Get-ZARPOStat.Tests.ps1 | 2 +- Tests/Public/Get-ZARPOStatusProportion.Tests.ps1 | 2 +- Tests/Public/Get-ZARPOSummary.Tests.ps1 | 2 +- Tests/Public/Get-ZASite.Tests.ps1 | 2 +- Tests/Public/Get-ZASitePair.Tests.ps1 | 2 +- Tests/Public/Get-ZASiteTopology.Tests.ps1 | 2 +- Tests/Public/Get-ZATask.Tests.ps1 | 6 +++--- Tests/Public/Get-ZAVolume.Tests.ps1 | 2 +- Tests/Public/Get-ZAVpg.Tests.ps1 | 2 +- Tests/Public/Get-ZertoDatastore.Tests.ps1 | 2 +- Tests/Public/Get-ZertoEvent.Tests.ps1 | 8 ++++---- Tests/Public/Get-ZertoPeerSite.Tests.ps1 | 2 +- Tests/Public/Invoke-ZARestRequest.Tests.ps1 | 2 +- Tests/Public/Invoke-ZertoFailover.Tests.ps1 | 10 +++++----- Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 | 6 +++--- Tests/Public/Invoke-ZertoMove.Tests.ps1 | 8 ++++---- Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 | 6 +++--- Tests/Public/Invoke-ZertoRestRequest.Tests.ps1 | 4 ++-- 54 files changed, 135 insertions(+), 138 deletions(-) diff --git a/Tests/Private/Get-ZertoApiFilter.Tests.ps1 b/Tests/Private/Get-ZertoApiFilter.Tests.ps1 index a4b5978..a42e57e 100644 --- a/Tests/Private/Get-ZertoApiFilter.Tests.ps1 +++ b/Tests/Private/Get-ZertoApiFilter.Tests.ps1 @@ -52,11 +52,11 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } it "one item test" { - Get-ZertoApiFilter -filtertable $oneItemTest | should be "?OneItem=Test" + Get-ZertoApiFilter -filtertable $oneItemTest | should -Be "?OneItem=Test" } it "should ignore CommonParameters" { - Get-ZertoApiFilter -filtertable $commonParamTest | should be "?OneItem=Test" + Get-ZertoApiFilter -filtertable $commonParamTest | should -Be "?OneItem=Test" } it "should process a filter table with more than one item" { diff --git a/Tests/Public/Add-ZertoPeerSite.Tests.ps1 b/Tests/Public/Add-ZertoPeerSite.Tests.ps1 index bdf4f52..3bbe71b 100644 --- a/Tests/Public/Add-ZertoPeerSite.Tests.ps1 +++ b/Tests/Public/Add-ZertoPeerSite.Tests.ps1 @@ -43,7 +43,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } @@ -53,11 +53,11 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "targetPort Parameter should have a Min value of 1024" { - (Get-Command $global:function).Parameters['targetPort'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 1024 + (Get-Command $global:function).Parameters['targetPort'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1024 } It "targetPort Parameter should have a Max value of 65535" { - (Get-Command $global:function).Parameters['targetPort'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 65535 + (Get-Command $global:function).Parameters['targetPort'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 65535 } It "Supports 'SupportsShouldProcess'" { diff --git a/Tests/Public/Connect-ZertoAnalytics.Tests.ps1 b/Tests/Public/Connect-ZertoAnalytics.Tests.ps1 index 661e985..2c335b6 100644 --- a/Tests/Public/Connect-ZertoAnalytics.Tests.ps1 +++ b/Tests/Public/Connect-ZertoAnalytics.Tests.ps1 @@ -13,8 +13,6 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } } - - Context "$($global:function)::Function Unit Tests" { InModuleScope -ModuleName ZertoApiWrapper { @@ -68,7 +66,6 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZARestRequest -Exactly 1 } - } Remove-Variable -Name function -Scope Global diff --git a/Tests/Public/Connect-ZertoServer.Tests.ps1 b/Tests/Public/Connect-ZertoServer.Tests.ps1 index 1cdc5b6..b43ca28 100644 --- a/Tests/Public/Connect-ZertoServer.Tests.ps1 +++ b/Tests/Public/Connect-ZertoServer.Tests.ps1 @@ -105,11 +105,11 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { $headers = Connect-ZertoServer -zertoServer $Server -credential $credential -returnHeaders It "returns a Hashtable with 2 keys" { $headers | Should -BeOfType Hashtable - $headers.keys.count | Should be 2 + $headers.keys.count | Should -Be 2 } It "return value has a key called 'x-zerto-session'" { - $headers.ContainsKey('x-zerto-session') | Should be $true + $headers.ContainsKey('x-zerto-session') | Should -Be $true } It "return key 'x-zerto-session' value should be a string" { @@ -118,11 +118,11 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "return value has a key called 'accept'" { - $headers.ContainsKey('accept') | Should be $true + $headers.ContainsKey('accept') | Should -Be $true } It "return key 'accept' value should be 'application/json'" { - $headers['accept'] | Should be 'application/json' + $headers['accept'] | Should -Be 'application/json' } It "should not require a port to be specified" { diff --git a/Tests/Public/Get-ZAAlert.Tests.ps1 b/Tests/Public/Get-ZAAlert.Tests.ps1 index 9695510..474bf6f 100644 --- a/Tests/Public/Get-ZAAlert.Tests.ps1 +++ b/Tests/Public/Get-ZAAlert.Tests.ps1 @@ -6,8 +6,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "LimitTo Parameter should have a Min value of 1" { - (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 1 + (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1 } It "LimitTo Parameter should have a Max value of 1000000" { - (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 1000000 + (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 1000000 } } diff --git a/Tests/Public/Get-ZADatastore.Tests.ps1 b/Tests/Public/Get-ZADatastore.Tests.ps1 index c148811..c1e5653 100644 --- a/Tests/Public/Get-ZADatastore.Tests.ps1 +++ b/Tests/Public/Get-ZADatastore.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAEvent.Tests.ps1 b/Tests/Public/Get-ZAEvent.Tests.ps1 index e1e40f6..3766d44 100644 --- a/Tests/Public/Get-ZAEvent.Tests.ps1 +++ b/Tests/Public/Get-ZAEvent.Tests.ps1 @@ -6,8 +6,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 16 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 16 + It "$global:function should have exactly 16 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 16 } $ParameterTestCases = @( @@ -42,21 +42,21 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "LimitTo Parameter should have a Min value of 1" { - (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 1 + (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1 } It "LimitTo Parameter should have a Max value of 1000000" { - (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 1000000 + (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 1000000 } It "Category parameter should only have 2 options" { - (Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should Be 2 + (Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 2 } It "Category parameter should take 'events'" { diff --git a/Tests/Public/Get-ZAJournalAverageHistory.Tests.ps1 b/Tests/Public/Get-ZAJournalAverageHistory.Tests.ps1 index 80bf748..1032f8f 100644 --- a/Tests/Public/Get-ZAJournalAverageHistory.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalAverageHistory.Tests.ps1 @@ -6,8 +6,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -36,17 +36,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalAverageSize.Tests.ps1 b/Tests/Public/Get-ZAJournalAverageSize.Tests.ps1 index f013489..ada02a1 100644 --- a/Tests/Public/Get-ZAJournalAverageSize.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalAverageSize.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalBreach.Tests.ps1 b/Tests/Public/Get-ZAJournalBreach.Tests.ps1 index b0761f1..b0ad1b1 100644 --- a/Tests/Public/Get-ZAJournalBreach.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalBreach.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAJournalHistoryStat.Tests.ps1 b/Tests/Public/Get-ZAJournalHistoryStat.Tests.ps1 index b0761f1..b0ad1b1 100644 --- a/Tests/Public/Get-ZAJournalHistoryStat.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalHistoryStat.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAJournalSiteAverageHistory.Tests.ps1 b/Tests/Public/Get-ZAJournalSiteAverageHistory.Tests.ps1 index 6583c27..a5f82d1 100644 --- a/Tests/Public/Get-ZAJournalSiteAverageHistory.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalSiteAverageHistory.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalSiteAverageSize.Tests.ps1 b/Tests/Public/Get-ZAJournalSiteAverageSize.Tests.ps1 index 6583c27..a5f82d1 100644 --- a/Tests/Public/Get-ZAJournalSiteAverageSize.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalSiteAverageSize.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalSiteHistoryStat.Tests.ps1 b/Tests/Public/Get-ZAJournalSiteHistoryStat.Tests.ps1 index 6583c27..a5f82d1 100644 --- a/Tests/Public/Get-ZAJournalSiteHistoryStat.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalSiteHistoryStat.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalSiteHistorySummary.Tests.ps1 b/Tests/Public/Get-ZAJournalSiteHistorySummary.Tests.ps1 index 6583c27..a5f82d1 100644 --- a/Tests/Public/Get-ZAJournalSiteHistorySummary.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalSiteHistorySummary.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalSiteSizeStat.Tests.ps1 b/Tests/Public/Get-ZAJournalSiteSizeStat.Tests.ps1 index 6583c27..a5f82d1 100644 --- a/Tests/Public/Get-ZAJournalSiteSizeStat.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalSiteSizeStat.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZAJournalStatusProportion.Tests.ps1 b/Tests/Public/Get-ZAJournalStatusProportion.Tests.ps1 index b0761f1..b0ad1b1 100644 --- a/Tests/Public/Get-ZAJournalStatusProportion.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalStatusProportion.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAJournalStorageStat.Tests.ps1 b/Tests/Public/Get-ZAJournalStorageStat.Tests.ps1 index b0761f1..b0ad1b1 100644 --- a/Tests/Public/Get-ZAJournalStorageStat.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalStorageStat.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAJournalSummary.Tests.ps1 b/Tests/Public/Get-ZAJournalSummary.Tests.ps1 index b0761f1..b0ad1b1 100644 --- a/Tests/Public/Get-ZAJournalSummary.Tests.ps1 +++ b/Tests/Public/Get-ZAJournalSummary.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 14 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 14 + It "$global:function should have exactly 14 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 14 } $ParameterTestCases = @( @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZANetworkSiteAverageIOPS.Tests.ps1 b/Tests/Public/Get-ZANetworkSiteAverageIOPS.Tests.ps1 index df1588a..1a3b5cc 100644 --- a/Tests/Public/Get-ZANetworkSiteAverageIOPS.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkSiteAverageIOPS.Tests.ps1 @@ -37,17 +37,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZANetworkSiteAveragePerformance.Tests.ps1 b/Tests/Public/Get-ZANetworkSiteAveragePerformance.Tests.ps1 index df1588a..1a3b5cc 100644 --- a/Tests/Public/Get-ZANetworkSiteAveragePerformance.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkSiteAveragePerformance.Tests.ps1 @@ -37,17 +37,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZANetworkSiteStat.Tests.ps1 b/Tests/Public/Get-ZANetworkSiteStat.Tests.ps1 index 80f948f..2c7833c 100644 --- a/Tests/Public/Get-ZANetworkSiteStat.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkSiteStat.Tests.ps1 @@ -36,7 +36,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZANetworkSiteSummary.Tests.ps1 b/Tests/Public/Get-ZANetworkSiteSummary.Tests.ps1 index 80f948f..2c7833c 100644 --- a/Tests/Public/Get-ZANetworkSiteSummary.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkSiteSummary.Tests.ps1 @@ -36,7 +36,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZANetworkVpgAverageIOPS.Tests.ps1 b/Tests/Public/Get-ZANetworkVpgAverageIOPS.Tests.ps1 index 191f7a9..ada02a1 100644 --- a/Tests/Public/Get-ZANetworkVpgAverageIOPS.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkVpgAverageIOPS.Tests.ps1 @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZANetworkVpgAveragePerformance.Tests.ps1 b/Tests/Public/Get-ZANetworkVpgAveragePerformance.Tests.ps1 index 191f7a9..ada02a1 100644 --- a/Tests/Public/Get-ZANetworkVpgAveragePerformance.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkVpgAveragePerformance.Tests.ps1 @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZANetworkVpgStat.Tests.ps1 b/Tests/Public/Get-ZANetworkVpgStat.Tests.ps1 index e9026db..f1ad9c2 100644 --- a/Tests/Public/Get-ZANetworkVpgStat.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkVpgStat.Tests.ps1 @@ -34,7 +34,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZANetworkVpgSummary.Tests.ps1 b/Tests/Public/Get-ZANetworkVpgSummary.Tests.ps1 index e9026db..f1ad9c2 100644 --- a/Tests/Public/Get-ZANetworkVpgSummary.Tests.ps1 +++ b/Tests/Public/Get-ZANetworkVpgSummary.Tests.ps1 @@ -34,7 +34,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 index bed9818..376f710 100644 --- a/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerJournalSizeReport.Tests.ps1 @@ -42,7 +42,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 index 5e2b7f6..be0afa1 100644 --- a/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerNetworkPerformanceReport.Tests.ps1 @@ -42,7 +42,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAPlannerSite.Tests.ps1 b/Tests/Public/Get-ZAPlannerSite.Tests.ps1 index ef63e5c..f15ee7b 100644 --- a/Tests/Public/Get-ZAPlannerSite.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerSite.Tests.ps1 @@ -27,7 +27,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 index bed9818..376f710 100644 --- a/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerStatsReport.Tests.ps1 @@ -42,7 +42,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 index 238ba22..97173fa 100644 --- a/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerWanReport.Tests.ps1 @@ -41,7 +41,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 b/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 index 0412e64..c7302d5 100644 --- a/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 +++ b/Tests/Public/Get-ZAPlannerZcasReport.Tests.ps1 @@ -41,7 +41,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZARPOAccountAverage.Tests.ps1 b/Tests/Public/Get-ZARPOAccountAverage.Tests.ps1 index 18f58ae..7cb989f 100644 --- a/Tests/Public/Get-ZARPOAccountAverage.Tests.ps1 +++ b/Tests/Public/Get-ZARPOAccountAverage.Tests.ps1 @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZARPOAverage.Tests.ps1 b/Tests/Public/Get-ZARPOAverage.Tests.ps1 index 8619700..aa6d9e7 100644 --- a/Tests/Public/Get-ZARPOAverage.Tests.ps1 +++ b/Tests/Public/Get-ZARPOAverage.Tests.ps1 @@ -35,17 +35,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 60" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 60 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60 } It "Interval Parameter should have a Max value of 2678400" { - (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 2678400 + (Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400 } } diff --git a/Tests/Public/Get-ZARPOBreach.Tests.ps1 b/Tests/Public/Get-ZARPOBreach.Tests.ps1 index 38456f9..b0ad1b1 100644 --- a/Tests/Public/Get-ZARPOBreach.Tests.ps1 +++ b/Tests/Public/Get-ZARPOBreach.Tests.ps1 @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZARPOStat.Tests.ps1 b/Tests/Public/Get-ZARPOStat.Tests.ps1 index 38456f9..b0ad1b1 100644 --- a/Tests/Public/Get-ZARPOStat.Tests.ps1 +++ b/Tests/Public/Get-ZARPOStat.Tests.ps1 @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZARPOStatusProportion.Tests.ps1 b/Tests/Public/Get-ZARPOStatusProportion.Tests.ps1 index 38456f9..b0ad1b1 100644 --- a/Tests/Public/Get-ZARPOStatusProportion.Tests.ps1 +++ b/Tests/Public/Get-ZARPOStatusProportion.Tests.ps1 @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZARPOSummary.Tests.ps1 b/Tests/Public/Get-ZARPOSummary.Tests.ps1 index 38456f9..b0ad1b1 100644 --- a/Tests/Public/Get-ZARPOSummary.Tests.ps1 +++ b/Tests/Public/Get-ZARPOSummary.Tests.ps1 @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZASite.Tests.ps1 b/Tests/Public/Get-ZASite.Tests.ps1 index fd61b07..e9c710c 100644 --- a/Tests/Public/Get-ZASite.Tests.ps1 +++ b/Tests/Public/Get-ZASite.Tests.ps1 @@ -14,7 +14,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "zOrgIdentifier has the NotNullOrEmpty Validator" { - (Get-Command $global:function).Parameters['zOrgIdentifier'].Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should Be 1 + (Get-Command $global:function).Parameters['zOrgIdentifier'].Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 } } diff --git a/Tests/Public/Get-ZASitePair.Tests.ps1 b/Tests/Public/Get-ZASitePair.Tests.ps1 index 18f58ae..7cb989f 100644 --- a/Tests/Public/Get-ZASitePair.Tests.ps1 +++ b/Tests/Public/Get-ZASitePair.Tests.ps1 @@ -29,7 +29,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZASiteTopology.Tests.ps1 b/Tests/Public/Get-ZASiteTopology.Tests.ps1 index f1136ba..f97e366 100644 --- a/Tests/Public/Get-ZASiteTopology.Tests.ps1 +++ b/Tests/Public/Get-ZASiteTopology.Tests.ps1 @@ -27,7 +27,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZATask.Tests.ps1 b/Tests/Public/Get-ZATask.Tests.ps1 index 7e712d4..c8ceb12 100644 --- a/Tests/Public/Get-ZATask.Tests.ps1 +++ b/Tests/Public/Get-ZATask.Tests.ps1 @@ -34,17 +34,17 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "Interval Parameter should have a Min value of 1" { - (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should Be 1 + (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1 } It "Interval Parameter should have a Max value of 1000000" { - (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should Be 1000000 + (Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 1000000 } } diff --git a/Tests/Public/Get-ZAVolume.Tests.ps1 b/Tests/Public/Get-ZAVolume.Tests.ps1 index c4b6a8c..6d1a5a0 100644 --- a/Tests/Public/Get-ZAVolume.Tests.ps1 +++ b/Tests/Public/Get-ZAVolume.Tests.ps1 @@ -30,7 +30,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZAVpg.Tests.ps1 b/Tests/Public/Get-ZAVpg.Tests.ps1 index ae44aa0..3b9bd52 100644 --- a/Tests/Public/Get-ZAVpg.Tests.ps1 +++ b/Tests/Public/Get-ZAVpg.Tests.ps1 @@ -28,7 +28,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Get-ZertoDatastore.Tests.ps1 b/Tests/Public/Get-ZertoDatastore.Tests.ps1 index 5deb346..49d9e80 100644 --- a/Tests/Public/Get-ZertoDatastore.Tests.ps1 +++ b/Tests/Public/Get-ZertoDatastore.Tests.ps1 @@ -12,7 +12,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "datastoreIdentifier parameter does not take null or empty values" { - (Get-Command $global:function).Parameters['datastoreIdentifier'].Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.count | Should Be 1 + (Get-Command $global:function).Parameters['datastoreIdentifier'].Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.count | Should -Be 1 } } diff --git a/Tests/Public/Get-ZertoEvent.Tests.ps1 b/Tests/Public/Get-ZertoEvent.Tests.ps1 index b257e26..4149371 100644 --- a/Tests/Public/Get-ZertoEvent.Tests.ps1 +++ b/Tests/Public/Get-ZertoEvent.Tests.ps1 @@ -53,13 +53,13 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } It "entityType parameter only accecpts 4 different values" { - (Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should be 4 + (Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 4 } It "entityType parameter accecpts 'VPG' as a Value" { @@ -79,7 +79,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "category parameter only accecpts 3 different values" { - (Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should be 3 + (Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 3 } It "category parameter accecpts 'All' as a Value" { @@ -95,7 +95,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "eventCategory parameter only accecpts 3 different values" { - (Get-Command $global:function).Parameters['eventCategory'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should be 3 + (Get-Command $global:function).Parameters['eventCategory'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 3 } It "eventCategory parameter accecpts 'All' as a Value" { diff --git a/Tests/Public/Get-ZertoPeerSite.Tests.ps1 b/Tests/Public/Get-ZertoPeerSite.Tests.ps1 index 2583c97..9456bd7 100644 --- a/Tests/Public/Get-ZertoPeerSite.Tests.ps1 +++ b/Tests/Public/Get-ZertoPeerSite.Tests.ps1 @@ -38,7 +38,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | Should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Invoke-ZARestRequest.Tests.ps1 b/Tests/Public/Invoke-ZARestRequest.Tests.ps1 index c545e56..7a6eade 100644 --- a/Tests/Public/Invoke-ZARestRequest.Tests.ps1 +++ b/Tests/Public/Invoke-ZARestRequest.Tests.ps1 @@ -63,7 +63,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } It "runs when called" { - Invoke-ZARestRequest -uri "myuri" | Should Be "Ran Command" + Invoke-ZARestRequest -uri "myuri" | Should -Be "Ran Command" } It "throws when the last action was over 60 minutes ago" { diff --git a/Tests/Public/Invoke-ZertoFailover.Tests.ps1 b/Tests/Public/Invoke-ZertoFailover.Tests.ps1 index 11dd2f9..efe2cc7 100644 --- a/Tests/Public/Invoke-ZertoFailover.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoFailover.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 20 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 20 + It "$global:function should have exactly 20 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 20 } $ParameterTestCases = @( @@ -55,7 +55,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } @@ -82,11 +82,11 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { (Get-Command $global:function).Parameters['shutdownPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 2 } - it "Time to wait before shutdown in sec should have a default value of 3600" { + It "Time to wait before shutdown in sec should have a default value of 3600" { Get-Command $global:function | Should -HaveParameter timeToWaitBeforeShutdownInSec -DefaultValue 3600 } - it "Time to wait before shutdown in sec should have a minimum value of 300 and max value of 86400" { + It "Time to wait before shutdown in sec should have a minimum value of 300 and max value of 86400" { (Get-Command $global:function).Parameters['timeToWaitBeforeShutdownInSec'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 300 (Get-Command $global:function).Parameters['timeToWaitBeforeShutdownInSec'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 86400 } diff --git a/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 b/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 index aec697f..b5d1cd6 100644 --- a/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 @@ -6,8 +6,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 15 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 15 + It "$global:function should have exactly 15 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 15 } $ParameterTestCases = @( @@ -41,7 +41,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Invoke-ZertoMove.Tests.ps1 b/Tests/Public/Invoke-ZertoMove.Tests.ps1 index 6217a52..393d66b 100644 --- a/Tests/Public/Invoke-ZertoMove.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoMove.Tests.ps1 @@ -5,8 +5,8 @@ $global:function = ((Split-Path -leaf $MyInvocation.MyCommand.Path).Split('.'))[ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 20 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 20 + It "$global:function should have exactly 20 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 20 } $ParameterTestCases = @( @@ -55,7 +55,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } @@ -67,7 +67,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { (Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'None' } - it "Commit Policy Timeout should have a minimum value of 300 and max value of 86400" { + It "Commit Policy Timeout should have a minimum value of 300 and max value of 86400" { (Get-Command $global:function).Parameters['commitPolicyTimeout'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 300 (Get-Command $global:function).Parameters['commitPolicyTimeout'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 86400 } diff --git a/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 b/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 index b8abfd8..81f585a 100644 --- a/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 @@ -6,8 +6,8 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { - it "$global:function should have exactly 16 parameters defined" { - (get-command $global:function).Parameters.Count | Should -Be 16 + It "$global:function should have exactly 16 parameters defined" { + (Get-Command $global:function).Parameters.Count | Should -Be 16 } $ParameterTestCases = @( @@ -41,7 +41,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { } default { - $true | should be $false -Because "No Validation Selected. Review test cases" + $true | Should -Be $false -Because "No Validation Selected. Review test cases" } } } diff --git a/Tests/Public/Invoke-ZertoRestRequest.Tests.ps1 b/Tests/Public/Invoke-ZertoRestRequest.Tests.ps1 index f7a23d5..f0c7315 100644 --- a/Tests/Public/Invoke-ZertoRestRequest.Tests.ps1 +++ b/Tests/Public/Invoke-ZertoRestRequest.Tests.ps1 @@ -40,12 +40,12 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { It " parameter cannot be null or empty" -TestCases $ParameterValidationTestCases { param($ParameterName) $thisParameter = $thisCommand.Parameters[$ParameterName] - $thisParameter.Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should Be 1 + $thisParameter.Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1 } It "Method parameter can only be 'GET', 'POST', 'PUT', 'DELETE'" { $thisParameter = $thisCommand.Parameters['method'] - $thisParameter.Attributes.Where{ $_ -is [ValidateSet] }.Count | Should Be 1 + $thisParameter.Attributes.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1 $thisParameter.Attributes.Where{ $_ -is [ValidateSet] }.validValues -contains 'GET' | Should -BeTrue $thisParameter.Attributes.Where{ $_ -is [ValidateSet] }.validValues -contains 'PUT' | Should -BeTrue $thisParameter.Attributes.Where{ $_ -is [ValidateSet] }.validValues -contains 'POST' | Should -BeTrue