@@ -8,15 +8,15 @@ using namespace System.Collections.Generic
88Describe " New-OrderHintCollection" {
99 It " should create an empty collection by default" {
1010 $collection = New-SqlOrderHintCollection
11- $collection | Should - BeNullOrEmpty
11+ Should- Be 0 $collection .Count
1212 }
1313
1414 It " should create a collection from a single order hint" {
1515 $collection = New-SqlOrderHintCollection (New-SqlOrderHint ID Descending)
1616 Should- Be 1 $collection.Count
1717
1818 $orderHint = $collection [0 ]
19- $orderHint.Column | Should - BeExactly ID
19+ Should - BeString ID $orderHint.Column - CaseSensitive
2020 Should- Be ([SortOrder ]::Descending) $orderHint.SortOrder
2121 }
2222
@@ -26,7 +26,7 @@ Describe "New-OrderHintCollection" {
2626 Should- Be 2 $collection.Count
2727
2828 $orderHint = $collection [$collection.Count - 1 ]
29- $orderHint.Column | Should - BeExactly Name
29+ Should - BeString Name $orderHint.Column - CaseSensitive
3030 Should- Be ([SortOrder ]::Ascending) $orderHint.SortOrder
3131 }
3232
@@ -67,14 +67,14 @@ Describe "New-OrderHintCollection" {
6767 It " should return the order hint with the specified column name" {
6868 $collection = New-SqlOrderHintCollection (New-SqlOrderHint ID Descending), (New-SqlOrderHint Name)
6969 $orderHint = $collection [" id" ]
70- $orderHint.Column | Should - BeExactly ID
70+ Should - BeString ID $orderHint.Column - CaseSensitive
7171 Should- Be ([SortOrder ]::Descending) $orderHint.SortOrder
7272 Should- Be $orderHint $collection [0 ]
7373 }
7474
7575 It " should return `$ null, or throw an error, if the specified column name does not exist" {
7676 $collection = New-SqlOrderHintCollection (New-SqlOrderHint ID Descending), (New-SqlOrderHint Name)
77- $collection [" foo" ] | Should - BeNullOrEmpty
77+ Should - BeNull $collection [" foo" ]
7878
7979 Set-StrictMode - Version Latest
8080 Should- Throw - ScriptBlock { $collection [" foo" ] }
@@ -102,7 +102,7 @@ Describe "New-OrderHintCollection" {
102102 $collection.RemoveAt (" name" )
103103 Should- Be 1 $collection.Count
104104 $collection.RemoveAt (" id" )
105- $collection | Should - BeNullOrEmpty
105+ Should- Be 0 $collection .Count
106106 }
107107
108108 It " should throw an error if the specified column name does not exist" {
0 commit comments