Skip to content

Instantly share code, notes, and snippets.

View exospheredata's full-sized avatar

Exosphere Data, inc exospheredata

View GitHub Profile
@exospheredata
exospheredata / toybox_v1.0.0.tests.ps1
Created February 6, 2017 19:03
Example Pester test for a PowerShell v5 Class
# Begin Testing
try
{
InModuleScope -ModuleName ToyBox -ScriptBlock {
Function Set-ObjectMockProperties ($object,[switch]$Exists)
{
# This function will load the object and set the global script variables with the values supplied.
# By doing this, we can later easily change how we interact with the object and make edits along
# the way in other Mocks or Tests.
@exospheredata
exospheredata / toybox_v1.0.0.psm1
Created January 14, 2017 20:16
Simple PowerShell v5 Class module to managing a ToyBox
#
# Example PowerShell v5 class
#
# Jeremy Goodrum - ExosphereData, LLC 2017
#
enum EnumState
{
Missing
Stored
@exospheredata
exospheredata / toybox_v0.1.0.psm1
Created January 12, 2017 18:59
Simple PowerShell v5 Class module to managing a ToyBox
#
# Example PowerShell v5 class for a ToyBox
#
# Jeremy Goodrum - ExosphereData, LLC 2017
# http://www.exospheredata.com/2017/01/12/building-your-first-powershell-class
enum EnumState
{
Missing
Stored