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()
4949 [ Test ]
5050 public void NotAvailableNotEvenEqualToItself ( )
5151 {
52- Assert . AreNotEqual ( ConditionalGetFingerprint . NOT_AVAILABLE , ConditionalGetFingerprint . NOT_AVAILABLE ) ;
52+ Assert . IsFalse ( ConditionalGetFingerprint . NOT_AVAILABLE . Equals ( ConditionalGetFingerprint . NOT_AVAILABLE ) ) ;
5353 Assert . AreSame ( ConditionalGetFingerprint . NOT_AVAILABLE , ConditionalGetFingerprint . NOT_AVAILABLE ) ;
5454 }
5555
Original file line number Diff line number Diff line change @@ -27,8 +27,13 @@ public ConditionalGetFingerprint Combine(ConditionalGetFingerprint other)
2727
2828 public override bool Equals ( object obj )
2929 {
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+
3237 ConditionalGetFingerprint conditionalGetFingerprint = obj as ConditionalGetFingerprint ;
3338 if ( conditionalGetFingerprint == null ) return false ;
3439
@@ -51,5 +56,6 @@ public string ETag
5156 {
5257 get { return eTag ; }
5358 }
59+
5460 }
5561}
You can’t perform that action at this time.
0 commit comments