Skip to content

Instantly share code, notes, and snippets.

@shaneis
Created December 27, 2017 22:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Pester test for the first AOC
Describe -Name 'Get-AOCDay01Part01' {
It -name 'should return a result of [<ExpectedResult>] for the input [<InputObject>]' -TestCases @(
@{ InputObject = 1122; ExpectedResult = 3 },
@{ InputObject = 1111; ExpectedResult = 4 },
@{ InputObject = 1234; ExpectedResult = 0 },
@{ InputObject = 91212129; ExpectedResult = 9 }
) {
param($InputObject, $ExpectedResult)
$Result = Get-AOCDay01Part01 -InputObject $InputObject
$Result | Should -Be $ExpectedResult
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment