Tests/Disable-HPDCDiskCaching.Tests.ps1

Get-Module HPWriteManager | Remove-Module -Force
Push-Location ..
Import-Module HPWriteManager -Force
Pop-Location

Describe "Disable-HPDCDiskCaching Tests" {

    Context 'Function Output' {
        It 'should return HKLM\\System\\CurrentControlSet\\Services\Tcpip' {
            Mock 'Disable-HPDCDiskCaching' -MockWith { '1' }
            Disable-HPDCDiskCaching -DiskNumber 1 | Should -Contain 'Caching disabled on disk'
        }
        It 'should have type String as output' {
            Mock 'Disable-HPDCDiskCaching' -MockWith { '1' }
            Disable-HPDCDiskCaching -DiskNumber 1 | Should -BeOfType String
        }
        It 'should return verbose output' {
            Mock 'Disable-HPDCDiskCaching' -MockWith { '1' }
            Disable-HPDCDiskCaching -DiskNumber 1 -Verbose | Should -Contain 'Verbose'
        }
    }
}