public void Same_Are_Not_Equal() { // Arrange var first = new BitCollection(false, Enumerable.Range(0, 10).Select(index => (byte)index).ToArray()); var second = new BitCollection(false, Enumerable.Range(10, 10).Select(index => (byte)index).ToArray()); // Act var areEqual = first.Equals(second); // Assert Assert.False(areEqual); }
public void Clones_Are_Equal_But_Not_Same() { // Arrange var bitCollection = new BitCollection(false, Enumerable.Range(0, 10).Select(index => (byte)index).ToArray()); var clone = bitCollection.Clone(); // Act var areEqual = bitCollection.Equals(clone); // Assert Assert.True(areEqual); Assert.That(clone, Is.Not.SameAs(bitCollection)); }