Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }