public void ShouldSetRevisionOnUnmappedDocumentEntity()
        {
            var documentEntity = DocumentEntity.FromEntity(entity, Default.Settings);

            documentEntity.Revision = "42-1a517022a0c2d4814d51abfedf9bfee7";

            Assert.Equal("42-1a517022a0c2d4814d51abfedf9bfee7", entity.Revision);
        }
        public void ShouldDetectDifferenceIfJsonDocumentIsNull()
        {
            var documentEntity = DocumentEntity.FromEntity(entity, Default.Settings);

            entity.Name = "Joe Fox";

            Assert.Null(documentEntity.Document);
            Assert.True(documentEntity.MapIfChanged());
        }
        public void ShouldLoadAllDataFromEntity()
        {
            var documentEntity = DocumentEntity.FromEntity(entity, Default.Settings);

            Assert.Equal("doc1", documentEntity.EntityId);
            Assert.Null(documentEntity.Revision);
            Assert.Equal(typeof(Entity), documentEntity.EntityType);
            Assert.Equal("entity", documentEntity.DocumentType);
            Assert.Same(entity, documentEntity.Entity);
        }