public void IEquatable_OtherBusinessObject_SameIndex_AreNotEqual() { var index = 5; IEquatable <BocListRow> row1 = new BocListRow(index, MockRepository.GenerateStub <IBusinessObject>()); IEquatable <BocListRow> row2 = new BocListRow(index, MockRepository.GenerateStub <IBusinessObject>()); Assert.That(row1.Equals(row2), Is.False); Assert.That(row2.Equals(row1), Is.False); }
public void IEquatable_SameBusinessObject_OtherIndex_AreNotEqual() { var businessObject = MockRepository.GenerateStub <IBusinessObject>(); IEquatable <BocListRow> row1 = new BocListRow(4, businessObject); IEquatable <BocListRow> row2 = new BocListRow(6, businessObject); Assert.That(row1.Equals(row2), Is.False); Assert.That(row2.Equals(row1), Is.False); }
public void IEquatable_SameBusinessObject_SameIndex_AreEqual() { var businessObject = MockRepository.GenerateStub <IBusinessObject>(); var index = 5; IEquatable <BocListRow> row1 = new BocListRow(index, businessObject); IEquatable <BocListRow> row2 = new BocListRow(index, businessObject); Assert.That(row1.Equals(row2), Is.True); Assert.That(row2.Equals(row1), Is.True); }
public void Equal_OtherType_AreNotEqual() { var row = new BocListRow(5, MockRepository.GenerateStub <IBusinessObject>()); Assert.That(row.Equals(new object()), Is.False); }
public void IEquatable_OtherRowNull_AreNotEqual() { IEquatable <BocListRow> row = new BocListRow(5, MockRepository.GenerateStub <IBusinessObject>()); Assert.That(row.Equals(null), Is.False); }