-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from it-praktyk/demo-extended
Demo tests extended, examples for v. 1.3.3. added
- Loading branch information
Showing
15 changed files
with
1,034 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,103 @@ | ||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | ||
. "$here\$sut" | ||
|
||
Import-Module "$here\DemoFunction1.ps1" | ||
|
||
Describe "DemoFunction1" { | ||
|
||
Context "Useless test 1-1" { | ||
|
||
It "does something useful 1-1-1" { | ||
DemoFunction1 -FirstParam 5 | Should BeLessThan 3 | ||
|
||
} | ||
|
||
It "does something useful 1-1-2" { | ||
|
||
DemoFunction1 -FirstParam 5 | Should BeLessThan 7 | ||
|
||
} | ||
|
||
It "does something useful 1-1-3" { | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
} | ||
|
||
} | ||
|
||
Context "Useless test 1-2" { | ||
|
||
It "does something useless 1-2-1" { | ||
|
||
DemoFunction1 -FirstParam 6 | Should Be 5 | ||
|
||
} | ||
|
||
It "does something useless 1-2-2" { | ||
|
||
DemoFunction1 -FirstParam 5 | Should Be 5 | ||
|
||
} | ||
|
||
It "does something useful 1-2-3" { | ||
|
||
$RandomResult = $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $RandomResult | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
|
||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | ||
. "$here\$sut" | ||
|
||
Import-Module "$here\DemoFunction1.ps1" | ||
|
||
Describe "DemoFunction1 - Random" -Tag Random { | ||
|
||
Context "Useless test R-1-1" { | ||
|
||
It "does something useful R-1-1-1" { | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 2 -Minimum 0) | Should Be $true | ||
|
||
} | ||
|
||
It "does something useful R-1-1-2" { | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 10 -Minimum 0) | Should BeLessThan 7 | ||
|
||
} | ||
|
||
It "does something useful R-1-1-3" { | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
} | ||
|
||
} | ||
|
||
Context "Useless test R-1-2" { | ||
|
||
It "does something useless R-1-2-1" { | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 32 -Minimum 27) | Should Be 30 | ||
|
||
} | ||
|
||
It "does something useless R-1-2-2" { | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeGreaterThan 30 | ||
|
||
} | ||
|
||
It "does something useful R-1-2-3" { | ||
|
||
$RandomResult = $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
DemoFunction1 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $RandomResult | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
|
||
Describe "DemoFunction1 - Static" -Tag Static { | ||
|
||
Context "Useless test S-1-1" { | ||
|
||
It "does something useful S-1-1-1" { | ||
|
||
DemoFunction1 -FirstParam 5 | Should BeLessThan 3 | ||
|
||
} | ||
|
||
It "does something useful S-1-1-2" { | ||
|
||
DemoFunction1 -FirstParam 5 | Should BeLessThan 7 | ||
|
||
} | ||
|
||
It "does something useful S-1-1-3" { | ||
|
||
DemoFunction1 -FirstParam 56 | Should Be 56 | ||
|
||
} | ||
|
||
} | ||
|
||
Context "Useless test S-1-2" { | ||
|
||
It "does something useless S-1-2-1" { | ||
|
||
DemoFunction1 -FirstParam 6 | Should Be 5 | ||
|
||
} | ||
|
||
It "does something useless S-1-2-2" { | ||
|
||
DemoFunction1 -FirstParam 5 | Should BeGreaterThan 3 | ||
|
||
} | ||
|
||
It "does something useful S-1-2-3" { | ||
|
||
DemoFunction1 -FirstParam 2 | Should Not Be 2 | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,103 @@ | ||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | ||
. "$here\$sut" | ||
|
||
Import-Module "$here\DemoFunction2.ps1" | ||
|
||
Describe "DemoFunction2" { | ||
|
||
Context "Useless test 2-1" { | ||
|
||
It "does something useful 2-1-1" { | ||
DemoFunction2 -FirstParam 5 | Should BeLessThan 3 | ||
|
||
} | ||
|
||
It "does something useful 2-1-2" { | ||
|
||
DemoFunction2 -FirstParam 5 | Should BeLessThan 6 | ||
|
||
} | ||
|
||
It "does something useful 2-1-3" { | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
} | ||
|
||
} | ||
|
||
Context "Useless test 2-2" { | ||
|
||
It "does something useless 2-2-1" { | ||
|
||
DemoFunction2 -FirstParam 6 | Should Be 5 | ||
|
||
} | ||
|
||
It "does something useless 2-2-2" { | ||
|
||
DemoFunction2 -FirstParam 5 | Should Be 5 | ||
|
||
} | ||
|
||
It "does something useful 2-2-3" { | ||
|
||
$RandomResult = $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $RandomResult | ||
|
||
|
||
} | ||
|
||
} | ||
|
||
} | ||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | ||
. "$here\$sut" | ||
|
||
Import-Module "$here\DemoFunction2.ps1" | ||
|
||
Describe "DemoFunction2 - Random" -Tag Random { | ||
|
||
Context "Useless test R-2-1" { | ||
|
||
It "does something useful R-2-1-1" { | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 2 -Minimum 0) | Should Be $true | ||
|
||
} | ||
|
||
It "does something useful R-2-2-2" { | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 10 -Minimum 0) | Should BeLessThan 7 | ||
|
||
} | ||
|
||
It "does something useful R-2-1-3" { | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
} | ||
|
||
} | ||
|
||
Context "Useless test R-2-2" { | ||
|
||
It "does something useless R-2-2-1" { | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 32 -Minimum 27) | Should Be 30 | ||
|
||
} | ||
|
||
It "does something useless R-2-2-2" { | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeGreaterThan 30 | ||
|
||
} | ||
|
||
It "does something useful R-2-2-3" { | ||
|
||
$RandomResult = $(Get-Random -Maximum 100 -Minimum 0) | ||
|
||
DemoFunction2 -FirstParam $(Get-Random -Maximum 100 -Minimum 0) | Should BeLessThan $RandomResult | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
|
||
Describe "DemoFunction2 - Static" -Tag Static { | ||
|
||
Context "Useless test S-2-1" { | ||
|
||
It "does something useful S-2-1-1" { | ||
|
||
DemoFunction2 -FirstParam 3 | Should Be 3 | ||
|
||
} | ||
|
||
It "does something useful S-2-2-2" { | ||
|
||
DemoFunction2 -FirstParam 8 | Should BeGreaterThan 7 | ||
|
||
} | ||
|
||
It "does something useful S-2-1-3" { | ||
|
||
DemoFunction2 -FirstParam 56 | Should Not Be 56 | ||
|
||
} | ||
|
||
} | ||
|
||
Context "Useless test S-2-2" { | ||
|
||
It "does something useless S-2-2-1" { | ||
|
||
DemoFunction2 -FirstParam 6 | Should Be 6 | ||
|
||
} | ||
|
||
It "does something useless S-2-2-2" { | ||
|
||
DemoFunction2 -FirstParam 2 | Should BeGreaterThan 3 | ||
|
||
} | ||
|
||
It "does something useful S-2-2-3" { | ||
|
||
DemoFunction2 -FirstParam 1 | Should BeLessThan 2 | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Example files generated by | ||
- Format-Pester v. 1.3.3 | ||
- PScribo v. 0.7.12.47 | ||
|
||
## Known issues | ||
- Polish (pl-PL) specific letters are not correctly dipslayed in a text format - [bug need be investigated](https://github.com/equelin/Format-Pester/issues/12) | ||
|
||
## en-US | ||
|
||
### 20160822a | ||
```powershell | ||
Invoke-Pester -Path .\demo\ -Quiet -PassThru | Format-Pester -Format word,html,text -Path .\examples\1.3.3\en-US\ -BaseFileName 20160822a -GroupResultsBy Result-Describe -Language en-us | ||
``` | ||
|
||
### 20160823b | ||
```powershell | ||
Invoke-Pester -Path .\demo\ -Quiet -PassThru -Tag Static | format-pester -Format word,html,text -Path .\examples\1.3.3\en-US\ -BaseFileName 20160822b -GroupResultsBy Result-Describe-Context -Language en-us | ||
``` | ||
|
||
## pl-PL | ||
|
||
### 20160822a | ||
```powershell | ||
Invoke-Pester -Path .\demo\ -Quiet -PassThru | Format-Pester -Format word,html,text -Path .\examples\1.3.3\pl-PL\ -BaseFileName 20160822a -GroupResultsBy Result-Describe -Language pl-PL | ||
``` | ||
|
||
### 20160823b | ||
```powershell | ||
Invoke-Pester -Path .\demo\ -Quiet -PassThru -Tag Static | format-pester -Format word,html,text -Path .\examples\1.3.3\pl-PL\ -BaseFileName 20160822b -GroupResultsBy Result-Describe-Context -Language pl-PL | ||
``` |
Binary file not shown.
Oops, something went wrong.