This repository was archived by the owner on Feb 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
UnitTests/WebDashboard/IO Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public void ShouldNeverEqualNotAvailable()
49
49
[ Test ]
50
50
public void NotAvailableNotEvenEqualToItself ( )
51
51
{
52
- Assert . AreNotEqual ( ConditionalGetFingerprint . NOT_AVAILABLE , ConditionalGetFingerprint . NOT_AVAILABLE ) ;
52
+ Assert . IsFalse ( ConditionalGetFingerprint . NOT_AVAILABLE . Equals ( ConditionalGetFingerprint . NOT_AVAILABLE ) ) ;
53
53
Assert . AreSame ( ConditionalGetFingerprint . NOT_AVAILABLE , ConditionalGetFingerprint . NOT_AVAILABLE ) ;
54
54
}
55
55
Original file line number Diff line number Diff line change @@ -27,8 +27,13 @@ public ConditionalGetFingerprint Combine(ConditionalGetFingerprint other)
27
27
28
28
public override bool Equals ( object obj )
29
29
{
30
- if ( this == NOT_AVAILABLE || obj == NOT_AVAILABLE ) return false ;
31
- if ( this == obj ) return true ;
30
+ System . Diagnostics . Debug . WriteLine ( "Equals obj" ) ;
31
+
32
+ if ( ReferenceEquals ( this , NOT_AVAILABLE ) ) return false ;
33
+ if ( ReferenceEquals ( obj , NOT_AVAILABLE ) ) return false ;
34
+
35
+ if ( ReferenceEquals ( this , obj ) ) return true ;
36
+
32
37
ConditionalGetFingerprint conditionalGetFingerprint = obj as ConditionalGetFingerprint ;
33
38
if ( conditionalGetFingerprint == null ) return false ;
34
39
@@ -51,5 +56,6 @@ public string ETag
51
56
{
52
57
get { return eTag ; }
53
58
}
59
+
54
60
}
55
61
}
You can’t perform that action at this time.
0 commit comments