Skip to content

Commit 81c7ca4

Browse files
committed
Refreshing
1 parent 90bef69 commit 81c7ca4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Tests/Get-Planet.Tests.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,21 @@ Describe 'Get-Planet' {
2020
$allPlanets = Get-Planet
2121
$allPlanets.Count | Should -Be 8
2222
}
23+
24+
It 'Earth is the third planet in our Solar System' {
25+
$allPlanets = Get-Planet
26+
$allPlanets[2].Name | Should -Be 'Earth'
27+
}
28+
29+
It 'Pluto is not part of our Solar System' {
30+
$allPlanets = Get-Planet
31+
$plutos = $allPlanets | Where-Object Name -EQ 'Pluto'
32+
$plutos.Count | Should -Be 0
33+
}
34+
35+
It 'Planets have this order: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune' {
36+
$allPlanets = Get-Planet
37+
$planetsInOrder = $allPlanets.Name -join ', '
38+
$planetsInOrder | Should -Be 'Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune'
39+
}
2340
}

0 commit comments

Comments
 (0)