@@ -36,6 +36,7 @@ public void HashShouldBeConstructableFromBytes()
3636
3737 // Then
3838 Assert . Equal ( expected , actual ) ;
39+ Assert . Equal ( 16 , candidate . Length ) ;
3940 }
4041
4142 [ Fact ( DisplayName = "Hash should be constructable from byte and length" ) ]
@@ -52,6 +53,7 @@ public void HashShouldBeConstructableFromByteAndLength()
5253
5354 // Then
5455 Assert . Equal ( expected , actual ) ;
56+ Assert . Equal ( 16 , candidate . Length ) ;
5557 }
5658
5759 [ Fact ( DisplayName = "Hash value should not be modified when altering the original byte array" ) ]
@@ -68,6 +70,7 @@ public void HashValueShouldNotBeModifiedWhenAlteringTheOriginalByteArray()
6870
6971 // Then
7072 Assert . Equal ( expected , actual ) ;
73+ Assert . Equal ( 4 , candidate . Length ) ;
7174 }
7275
7376 [ Fact ( DisplayName = "Hash value should not be modified when altering the obtained byte array" ) ]
@@ -83,6 +86,7 @@ public void HashValueShouldNotBeModifiedWhenAlteringTheObtainedByteArray()
8386
8487 // Then
8588 Assert . Equal ( expected , actual ) ;
89+ Assert . Equal ( 4 , candidate . Length ) ;
8690 }
8791
8892 [ Fact ( DisplayName = "Identical default hash values should be considered equal" ) ]
@@ -98,6 +102,9 @@ public void IdenticalDefaultHashValuesShouldBeConsideredEqual()
98102 Assert . True ( left . Equals ( right ) ) ;
99103 Assert . True ( left == right ) ;
100104 Assert . False ( left != right ) ;
105+
106+ Assert . Equal ( 0 , left . Length ) ;
107+ Assert . Equal ( 0 , right . Length ) ;
101108 }
102109
103110 [ Fact ( DisplayName = "Identical hash values should be considered equal" ) ]
@@ -113,6 +120,9 @@ public void IdenticalHashValuesShouldBeConsideredEqual()
113120 Assert . True ( left . Equals ( right ) ) ;
114121 Assert . True ( left == right ) ;
115122 Assert . False ( left != right ) ;
123+
124+ Assert . Equal ( 4 , left . Length ) ;
125+ Assert . Equal ( 4 , right . Length ) ;
116126 }
117127
118128 [ Fact ( DisplayName = "Different hash values should not be considered equal" ) ]
@@ -128,6 +138,9 @@ public void DifferentHashValuesShouldNotBeConsideredEqual()
128138 Assert . False ( left . Equals ( right ) ) ;
129139 Assert . False ( left == right ) ;
130140 Assert . True ( left != right ) ;
141+
142+ Assert . Equal ( 4 , left . Length ) ;
143+ Assert . Equal ( 4 , right . Length ) ;
131144 }
132145
133146 [ Fact ( DisplayName = "Identical hash values should produce identical hash codes" ) ]
@@ -143,6 +156,9 @@ public void IdenticalHashValuesShouldProduceIdenticalHashCodes()
143156
144157 // Then
145158 Assert . Equal ( leftHashCode , rightHashCode ) ;
159+
160+ Assert . Equal ( 4 , left . Length ) ;
161+ Assert . Equal ( 4 , right . Length ) ;
146162 }
147163
148164 [ Fact ( DisplayName = "Different hash values should produce different hash codes" ) ]
@@ -158,6 +174,9 @@ public void DifferentHashValuesShouldProduceDifferentHashCodes()
158174
159175 // Then
160176 Assert . NotEqual ( leftHashCode , rightHashCode ) ;
177+
178+ Assert . Equal ( 4 , left . Length ) ;
179+ Assert . Equal ( 4 , right . Length ) ;
161180 }
162181
163182 [ Fact ( DisplayName = "Hashes should produce a negative-one sort order when the left-hand hash is lesser than the right-hand hash" ) ]
@@ -173,6 +192,9 @@ public void HashesShouldProduceANegativeOneSortOrderWhenTheLeftHandHashIsLesserT
173192
174193 // Then
175194 Assert . Equal ( expected , actual ) ;
195+
196+ Assert . Equal ( 1 , left . Length ) ;
197+ Assert . Equal ( 1 , right . Length ) ;
176198 }
177199
178200 [ Fact ( DisplayName = "Hashes should produce a positive-one sort order when the left-hand hash is greater than the right-hand hash" ) ]
@@ -188,6 +210,9 @@ public void HashesShouldProduceAPositiveOneSortOrderWhenTheLeftHandHashIsGreater
188210
189211 // Then
190212 Assert . Equal ( expected , actual ) ;
213+
214+ Assert . Equal ( 1 , left . Length ) ;
215+ Assert . Equal ( 1 , right . Length ) ;
191216 }
192217
193218 [ Fact ( DisplayName = "Hashes should produce a zero sort order when the left-hand hash is equal to the right-hand hash" ) ]
@@ -203,6 +228,9 @@ public void HashesShouldProduceAZeroSortOrderWhenTheLeftHandHashIsEqualToTheRigh
203228
204229 // Then
205230 Assert . Equal ( expected , actual ) ;
231+
232+ Assert . Equal ( 1 , left . Length ) ;
233+ Assert . Equal ( 1 , right . Length ) ;
206234 }
207235
208236 [ Theory ( DisplayName = "Hash.Compute should produce the expected hash using a byte array" ) ]
0 commit comments