Example #1
0
        public void DocumentUpdateDtoProperlyReversedToDocumentUpdate()
        {
            DocumentUpdateDto upDto1 = new DocumentUpdateDto
            {
                Id                  = 1,
                DocumentId          = 1,
                IsPublished         = true,
                LatestTopicsUpdated = "This is the first version of the document.",
                Timestamp           = DateTime.Today
            };

            DocumentUpdate up1 = new DocumentUpdate
            {
                Id                  = 1,
                DocumentId          = 1,
                IsPublished         = true,
                LatestTopicsUpdated = "This is the first version of the document.",
                Timestamp           = DateTime.Today
            };

            DocumentUpdate a2 = _mapper.Map <DocumentUpdate>(upDto1);

            Assert.NotNull(a2);
            Assert.True(up1.Equals(a2));
            Assert.True(up1.Equals(a2, true));
        }