public void Should_be_possible_to_create_a_definition_document_from_Dto()
        {

            // Arrange
            var sampleInfo = new DefinitionInfo();
            sampleInfo.Id = "def01";
            sampleInfo.Text = "def01_text";
            var factory = new DefinitionDocumentFactory(localDataProvider);

            // Act
            var definitionDocument = factory.CreateDefinitionDocumentFromInfo(localDataProvider.GetSession(), sampleInfo);
            
            // Assert
            Assert.IsNotNull(definitionDocument);
            Assert.AreEqual(sampleInfo.Id, definitionDocument.OriginalId);
            Assert.AreEqual(sampleInfo.Text, definitionDocument.Text);
        }
        public void Should_be_possible_to_load_a_created_definition()
        {
            IDocumentSession fakeSession = localDataProvider.GetSession();

            // Arrange
            var sampleInfo = new DefinitionInfo();
            sampleInfo.Id = "def01";
            sampleInfo.Text = "def01_text";
            var factory = new DefinitionDocumentFactory(localDataProvider);

            // Act           
            factory.CreateDefinitionDocumentFromInfo(fakeSession, sampleInfo);
            var definitionDocument = localDataProvider.GetSession().Query<DefinitionDocument>().Single(x=>x.OriginalId == sampleInfo.Id);

            // Assert
            Assert.IsNotNull(definitionDocument);
            Assert.AreEqual(sampleInfo.Id, definitionDocument.OriginalId);
            Assert.AreEqual(sampleInfo.Text, definitionDocument.Text);
        }
        public void Should_be_stored_a_created_definition_hash()
        {

            // Arrange
            var sampleInfo = new DefinitionInfo() { Id = "def01", Text = "def01_text" };
            var factory = new DefinitionDocumentFactory(localDataProvider);

            // Act
            var result = factory.CreateDefinitionDocumentFromInfo(localDataProvider.GetSession(), sampleInfo);

            // Assert
            Assert.IsFalse(string.IsNullOrEmpty(result.Hash));
        }