PowerShellOrg/DSC — pull request #96 by ArtWDrahn (2014-11-10 18:40:28+00:00)
Title: Adding Tests for cDscDiagnostics Module

Given I wanted to change some of the functions to expose them to the public, correct some of the logic that exists in the module, and learn Pester I figured this was a good module to write tests for. This should cover all functions except two, Get-WinEvent and Enable-DscEventLog. Enable-DscEventLog wasn't tested because I couldn't figure out a good way (without modifying the function to mock wevtutil. I'm sure someone smarter then me will know a good way to test this. Get-WinEvent wasn't tested because I couldn't figure out how to mock the wrapper instead of the specific module.

This is also written to test the master branch as written. So it does not include any of my modifications to Test-DscEventLogStatus or Enable-DscEventLog, these tests will need to be rewritten if those changes are going to be taken.

Completely open to feedback as this is the first real dive into Pester.