Skip to content

Commit

Permalink
Add integration tests for 'CommandsMissed' property of FunctionRecord…
Browse files Browse the repository at this point in the history
… objects
  • Loading branch information
MathieuBuisson committed Jun 14, 2017
1 parent 59a784a commit 6c998ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Tests/Integration/HealthReport.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Describe 'Invoke-PSCodeHealth' {
It 'Should return correct TestCoverage metric for the function Add-CoverageInfo' {
$AddCoverageInfo.TestCoverage | Should Be 0
}
It 'Should return correct CommandsMissed metric for the function Add-CoverageInfo' {
$AddCoverageInfo.CommandsMissed | Should Be 3
}
It 'Should return correct Complexity metric for the function Add-CoverageInfo' {
$AddCoverageInfo.Complexity | Should Be 1
}
Expand All @@ -46,6 +49,9 @@ Describe 'Invoke-PSCodeHealth' {
It 'Should return correct TestCoverage metric for the function Get-CoverageArray' {
$GetCoverageArray.TestCoverage | Should Be 0
}
It 'Should return correct CommandsMissed metric for the function Get-CoverageArray' {
$GetCoverageArray.CommandsMissed | Should Be 18
}
It 'Should return correct Complexity metric for the function Get-CoverageArray' {
$GetCoverageArray.Complexity | Should Be 5
}
Expand All @@ -61,6 +67,9 @@ Describe 'Invoke-PSCodeHealth' {
It 'Should return correct TestCoverage metric for the function Format-FileCoverage' {
$FormatFileCoverage.TestCoverage | Should Be 100
}
It 'Should return correct CommandsMissed metric for the function Format-FileCoverage' {
$FormatFileCoverage.CommandsMissed | Should Be 0
}
It 'Should return correct Complexity metric for the function Format-FileCoverage' {
$FormatFileCoverage.Complexity | Should Be 2
}
Expand All @@ -76,6 +85,9 @@ Describe 'Invoke-PSCodeHealth' {
It 'Should return correct TestCoverage metric for the function Format-Coverage' {
$FormatCoverage.TestCoverage | Should Be 0
}
It 'Should return correct CommandsMissed metric for the function Format-Coverage' {
$FormatCoverage.CommandsMissed | Should Be 20
}
It 'Should return correct Complexity metric for the function Format-Coverage' {
$FormatCoverage.Complexity | Should Be 3
}
Expand All @@ -91,6 +103,9 @@ Describe 'Invoke-PSCodeHealth' {
It 'Should return correct TestCoverage metric for the function Get-CoveragePercentage' {
$GetCoveragePercentage.TestCoverage | Should Be 100
}
It 'Should return correct CommandsMissed metric for the function Get-CoveragePercentage' {
$GetCoveragePercentage.CommandsMissed | Should Be 0
}
It 'Should return correct Complexity metric for the function Get-CoveragePercentage' {
$GetCoveragePercentage.Complexity | Should Be 2
}
Expand Down

0 comments on commit 6c998ab

Please sign in to comment.