From 9813d3d4b3a3f651d76d533eabc1498d3bac2256 Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Mon, 28 Dec 2015 11:12:46 -0800 Subject: [PATCH] Removed spurious tests --- src/pester-tests/#%2Amerge%2A#31209PgX# | 14 ----- src/pester-tests/#%2Amerge%2A#9359p5X# | 14 ----- src/pester-tests/ConvertTo-Xml.Tests.ps1 | 46 ---------------- .../Set-PSBreakpoint.Tests.ps1.orig | 51 ------------------ src/pester-tests/test | Bin 408 -> 0 bytes 5 files changed, 125 deletions(-) delete mode 100644 src/pester-tests/#%2Amerge%2A#31209PgX# delete mode 100644 src/pester-tests/#%2Amerge%2A#9359p5X# delete mode 100644 src/pester-tests/ConvertTo-Xml.Tests.ps1 delete mode 100644 src/pester-tests/Set-PSBreakpoint.Tests.ps1.orig delete mode 100755 src/pester-tests/test diff --git a/src/pester-tests/#%2Amerge%2A#31209PgX# b/src/pester-tests/#%2Amerge%2A#31209PgX# deleted file mode 100644 index 3692e94191..0000000000 --- a/src/pester-tests/#%2Amerge%2A#31209PgX# +++ /dev/null @@ -1,14 +0,0 @@ -$here = Split-Path -Parent $MyInvocation.MyCommand.Path - -Describe "Set-PSBreakpoint" { - New-Variable -Name script -Value $here/assets/testablescript.ps1 -Scope Global -Force - - It "Should be able to called with script and line parameters without error " { - { Set-PSBreakpoint -Script $script -Line 1 } | Should Not Throw - } - - It "Should be able to be called using the command switch" { - # Note- we don't actually require the command to exist in the script- it will simply not get a breakpoint - { Set-PSBreakpoint -Script $script -Command aoeuaoeu } | Should Not Throw - } -} diff --git a/src/pester-tests/#%2Amerge%2A#9359p5X# b/src/pester-tests/#%2Amerge%2A#9359p5X# deleted file mode 100644 index 842ee47fde..0000000000 --- a/src/pester-tests/#%2Amerge%2A#9359p5X# +++ /dev/null @@ -1,14 +0,0 @@ -Describe "Wait-Event" { - - Context "Validate Wait-Event is waiting for events" { - It "Should time out when it does not receive a FakeEvent" { - # Don't depend on Measure-Command - $stopwatch = [System.Diagnostics.Stopwatch]::startNew() - # Testing the the timeout, so wait for an event that will never be - # raised because it is fake - Wait-Event -Timeout 1 -SourceIdentifier "FakeEvent" - $stopwatch.Stop() - $stopwatch.ElapsedMilliseconds | Should BeGreaterThan 1000 - } - } -} diff --git a/src/pester-tests/ConvertTo-Xml.Tests.ps1 b/src/pester-tests/ConvertTo-Xml.Tests.ps1 deleted file mode 100644 index a44385af55..0000000000 --- a/src/pester-tests/ConvertTo-Xml.Tests.ps1 +++ /dev/null @@ -1,46 +0,0 @@ -Describe "Test-ConvertTo-Xml" { - $testObject = Get-ChildItem - $slash = [System.IO.Path]::DirectorySeparatorChar - $testDirectory = $Env:TEMP + $slash + "testDirectory" - $testfile = $testDirectory + $slash + "testfile.xml" - $nl = [Environment]::NewLine - - New-Item $testDirectory -ItemType Directory -Force - - It "Should create an xml Document" { - $($testObject | ConvertTo-Xml).GetType().Name | Should Be XmlDocument - } - - It "Should be able to save an object after being converted to an xml object" { - { $xml = $testObject | ConvertTo-Xml - $xml.Save($testfile) } | Should Not Throw - - Test-Path $testfile | Should Be $true - } - - It "Should have a data type of XmlDocument and a BaseType of System.Xml.XmlNode" { - $actual = $testObject | ConvertTo-Xml - - } - - It "Should be able to use the As switch without error" { - { ConvertTo-Xml -InputObject $testObject -As String } | Should Not Throw - { ConvertTo-Xml -InputObject $testObject -As Document } | Should Not Throw - { ConvertTo-Xml -InputObject $testObject -As Stream } | Should Not Throw - } - - It "Should be the same output between the As switch and just saving the file as an xml document" { - # Create the test object, and do some formatting to get it in a testable format - $asSwitch = ($testObject | ConvertTo-Xml -As String).Split([Environment]::NewLine,[System.StringSplitOptions]::RemoveEmptyEntries) - - ($testObject | ConvertTo-Xml).Save($testfile) - - # iterate through each line and compare the saved variable and the file contents - for($line=0; $line -le $testfile.Length; $line++) - { - $currentLine = (Get-Content $testfile)[$line] - - $currentLine | Should Be $asSwitch[$line] - } - } -} diff --git a/src/pester-tests/Set-PSBreakpoint.Tests.ps1.orig b/src/pester-tests/Set-PSBreakpoint.Tests.ps1.orig deleted file mode 100644 index 75a338b8b3..0000000000 --- a/src/pester-tests/Set-PSBreakpoint.Tests.ps1.orig +++ /dev/null @@ -1,51 +0,0 @@ -<<<<<<< HEAD -$here = Split-Path -Parent $MyInvocation.MyCommand.Path - -Describe "Set-PSBreakpoint" { - New-Variable -Name script -Value $here/assets/testablescript.ps1 -Scope Global -Force - - It "Should be able to called with script and line parameters without error " { - { Set-PSBreakpoint -Script $script -Line 1 } | Should Not Throw - } - - It "Should be able to be called using the command switch" { - # Note- we don't actually require the command to exist in the script- it will simply not get a breakpoint - { Set-PSBreakpoint -Script $script -Command aoeuaoeu } | Should Not Throw - } -} -======= -$here = Split-Path -Parent $MyInvocation.MyCommand.Path - -Describe "Set-PSBreakpoint" { - # Set up test script - $testScript = "$here/psbreakpointtestscript.ps1" - - "`$var = 1 " > $testScript - - It "Should be able to set a psbreakpoint on a line" { - $lineNumber = 1 - $(Set-PSBreakpoint -Line $lineNumber -Script $testScript).Line | Should Be $lineNumber - } - - It "Should throw when a string is entered for a line number" { - { - $lineNumber = "one" - $(Set-PSBreakpoint -Line $lineNumber -Script $testScript).Line - - } | Should Throw - } - - It "Should be able to set a psbreakpoint on a Command" { - $command = "theCommand" - $(Set-PSBreakpoint -Command $command -Script $testScript).Command | Should Be $command - } - - It "Should be able to set a psbreakpoint on a variable" { - $var = "theVariable" - $(Set-PSBreakpoint -Command $var -Script $testScript).Command | Should Be $var - } - - # clean up after ourselves - Remove-Item -Path $testScript -} ->>>>>>> master diff --git a/src/pester-tests/test b/src/pester-tests/test deleted file mode 100755 index a2f5918d12641d30c4d44b6457de639c0d484879..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 408 zcma)&K?{OV5QOLKuaFK=R6-p)cnJd!MbV){bP&@DQbUdM&sU#{SkNJseLK9JH#_@Y z&#h9Ol`GIl4medpn(8RxF4YxeY9d=*jX^e9vNKLoQ?lV1;5r7>nY@a3tn>=GiWPzz z&Sx!Emh^IMm>0;$QAh?lR1x`TK{TX@#%m+lp