Equals() public method

Determines whether the specified System.Object, is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with this instance.
return bool
コード例 #1
0
 public void Test_Equals()
 {
     var test = new WorkGroup(Name, 1, 10);
     var test2 = new WorkGroup(Name, 50, 50);
     Assert.True(test.Equals(test2));
 }
コード例 #2
0
 public void Test_NotEquals()
 {
     var test = new WorkGroup(Name, 1, 10);
     var test2 = new WorkGroup("notequal", 50, 50);
     Assert.False(test.Equals(test2));
 }
コード例 #3
0
 public void Test_Equals_Null_False()
 {
     var test = new WorkGroup(Name, 1, 10);
     Assert.False(test.Equals(null));
 }