From e7092ba3933f64fd364c89483b57cd2bcbad676b Mon Sep 17 00:00:00 2001 From: Dicey Dai Date: Sun, 8 May 2016 21:45:04 -0700 Subject: [PATCH] Add Unit Test for New-TimeSpan --- test/powershell/New-TimeSpan.Tests.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/powershell/New-TimeSpan.Tests.ps1 b/test/powershell/New-TimeSpan.Tests.ps1 index a4bff3c57e..33b25f02e4 100644 --- a/test/powershell/New-TimeSpan.Tests.ps1 +++ b/test/powershell/New-TimeSpan.Tests.ps1 @@ -1,3 +1,14 @@ +Describe "New-TimeSpan DRT Unit Tests" -Tags DRT{ + It "Should works proper with new-timespan"{ + $results = New-TimeSpan -Days 10 -Hours 10 -Minutes 10 -Seconds 10 + $results.GetType() | Should Be timespan + $results.Days | Should Be 10 + $results.Hours | Should Be 10 + $results.Minutes | Should Be 10 + $results.Seconds | Should Be 10 + } +} + Describe "New-TimeSpan" { It "Should be able to create a new timespan object" { New-Variable -Name testObject -Value $(New-TimeSpan)