Exemplo n.º 1
0
        public void with_promise_and_create_handle_should_be_linked_to_document_1()
        {
            _writer.Promise(_handle1, 1);
            _writer.CreateIfMissing(_handle1, null, 1);
            _writer.LinkDocument(_handle1, _doc1, 2);

            var h = _writer.FindOneById(_handle1);

            Assert.AreEqual(_doc1, h.DocumentDescriptorId);
        }
 public void On(DocumentDescriptorInitialized e)
 {
     //need eager association with descriptor to correctly manage association
     //with attachment.
     _writer.CreateIfMissing(
         e.HandleInfo.Handle,
         e.Id,
         e.CheckpointToken
         );
 }