From f908daebfbae3267e4c3484cc5930e7ae5e8d070 Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Thu, 19 Nov 2015 06:24:28 +0000 Subject: [PATCH] Added pester tests for Update-TypeData --- src/pester-tests/Update-TypeData.Tests.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/pester-tests/Update-TypeData.Tests.ps1 diff --git a/src/pester-tests/Update-TypeData.Tests.ps1 b/src/pester-tests/Update-TypeData.Tests.ps1 new file mode 100644 index 0000000000..611e88d151 --- /dev/null +++ b/src/pester-tests/Update-TypeData.Tests.ps1 @@ -0,0 +1,15 @@ +Describe "Update-TypeData" { + + Context "Validate Update-Type updates correctly" { + + It "Should not throw upon reloading previous formatting file" { + { Update-TypeData } | Should Not throw + } + + It "Should validly load formatting data" { + { Get-TypeData -typename System.Diagnostics.Process | Export-TypeData -Path "outputfile.ps1xml" } + { Update-TypeData -prependPath "outputfile.ps1xml" | Should Not throw } + { Remove-Item "outputfile.ps1xml" -ErrorAction SilentlyContinue } + } + } +}