public void Equals_Test() { var firstDocumentPosition = new DocumentPosition { Document = "Test", RowNumber = 10, ColNumber = 5 }; var secondDocumentPosition = new DocumentPosition { Document = "Test", RowNumber = 10, ColNumber = 5 }; firstDocumentPosition.Equals(secondDocumentPosition).Should().BeTrue(); secondDocumentPosition.Document = "New"; firstDocumentPosition.Equals(secondDocumentPosition).Should().BeFalse(); secondDocumentPosition.Document = firstDocumentPosition.Document; secondDocumentPosition.RowNumber = 25; firstDocumentPosition.Equals(secondDocumentPosition).Should().BeFalse(); secondDocumentPosition.RowNumber = firstDocumentPosition.RowNumber; secondDocumentPosition.ColNumber = 25; firstDocumentPosition.Equals(secondDocumentPosition).Should().BeFalse(); }