public void ReturnsFalseWhenOneDocumentIsNullWhenEqualityIsChecked() { var guid = Guid.NewGuid().ToString(); var document1 = new TestDocument(guid) { Revision = "1" }; var documentsAreEqual = document1.Equals(null); Assert.That(documentsAreEqual, Is.False); }
public void DocumentsWithTheSameIdAndRevisionAreEqual() { var guid = Guid.NewGuid().ToString(); var document1 = new TestDocument(guid) {Revision = "1"}; var document2 = new TestDocument(guid) {Revision = "1"}; var documentsAreEqual = document1.Equals(document2); Assert.That(documentsAreEqual, Is.True); }