mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-08 04:07:05 -06:00
PowerShell - leap, raindrops, reverse-string, two-fer
This commit is contained in:
21
powershell/leap/LeapYear.tests.ps1
Normal file
21
powershell/leap/LeapYear.tests.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
BeforeAll {
|
||||
. ".\LeapYear.ps1"
|
||||
}
|
||||
|
||||
Describe "LeapYear Tests" {
|
||||
It "Year not divisible by 4: common year" {
|
||||
Test-LeapYear(2015) | Should -Be $false
|
||||
}
|
||||
|
||||
It "Year divisible by 4, not divisible by 100: leap year" {
|
||||
Test-LeapYear(1996) | Should -Be $true
|
||||
}
|
||||
|
||||
It "Year divisible by 100, not divisible by 400: common year" {
|
||||
Test-LeapYear(2100) | Should -Be $false
|
||||
}
|
||||
|
||||
It "Year divisible by 400: leap year" {
|
||||
Test-LeapYear(2000) | Should -Be $true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user