Commit ef45583 1 parent b632408 commit ef45583 Copy full SHA for ef45583
File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,32 @@ public void ToStringShouldProduceBrackets()
15
15
{
16
16
Assert . Equal ( "()" , Unit . Value . ToString ( ) ) ;
17
17
}
18
+
19
+ [ Fact ]
20
+ public void GetHashCodeShouldBeZero ( )
21
+ {
22
+ Assert . Equal ( 0 , Unit . Value . GetHashCode ( ) ) ;
23
+ }
24
+
25
+ [ Fact ]
26
+ public void CompareToShouldBeZero ( )
27
+ {
28
+ Assert . Equal ( 0 , Unit . Value . CompareTo ( Unit . Value ) ) ;
29
+ }
30
+
31
+ [ Fact ]
32
+ public void EqualityOperatorShouldWork ( )
33
+ {
34
+ #pragma warning disable CS1718 // Comparison made to same variable
35
+ Assert . True ( Unit . Value == Unit . Value ) ;
36
+ #pragma warning restore CS1718 // Comparison made to same variable
37
+ }
38
+
39
+ [ Fact ]
40
+ public void InequalityOperatorShouldWork ( )
41
+ {
42
+ #pragma warning disable CS1718 // Comparison made to same variable
43
+ Assert . False ( Unit . Value != Unit . Value ) ;
44
+ #pragma warning restore CS1718 // Comparison made to same variable
45
+ }
18
46
}
You can’t perform that action at this time.
0 commit comments