public void DocumentWithIdPropertyIsStored_HashSymbolInId_HashSymbolNotRemovedFromId() { const string TEST_DOCUMENT_ID = "FooDocument/#123"; using (var store = GetDocumentStore()) { var newDocument = new FooDocumentWithIdProperty() { Id = TEST_DOCUMENT_ID, Property1 = "ABC", Property2 = 123456 }; using (var commands = store.Commands()) { commands.Put(TEST_DOCUMENT_ID, null, newDocument, new Dictionary <string, object> { { Constants.Documents.Metadata.Collection, "FooDocumentWithIdProperty" } }); } using (var session = store.OpenSession()) { var fetchedDocument = session.Load <FooDocumentWithIdProperty>(TEST_DOCUMENT_ID); Assert.NotNull(fetchedDocument); } } }
public void DocumentWithIdPropertyIsStored_HashSymbolInId_HashSymbolNotRemovedFromId() { const string TEST_DOCUMENT_ID = "FooDocument/#123"; using (var store = NewRemoteDocumentStore()) { var newDocument = new FooDocumentWithIdProperty() { Id = TEST_DOCUMENT_ID, Property1 = "ABC", Property2 = 123456 }; store.DatabaseCommands.Put(TEST_DOCUMENT_ID, null, RavenJObject.FromObject(newDocument), new RavenJObject { {Constants.RavenEntityName, "FooDocumentWithIdProperty"} }); using (var session = store.OpenSession()) { var fetchedDocument = session.Load<FooDocumentWithIdProperty>(TEST_DOCUMENT_ID); Assert.NotNull(fetchedDocument); } } }
public void DocumentWithIdPropertyIsStored_HashSymbolInId_HashSymbolNotRemovedFromId() { const string TEST_DOCUMENT_ID = "FooDocument/#123"; using (var store = NewRemoteDocumentStore()) { var newDocument = new FooDocumentWithIdProperty() { Id = TEST_DOCUMENT_ID, Property1 = "ABC", Property2 = 123456 }; store.DatabaseCommands.Put(TEST_DOCUMENT_ID, null, RavenJObject.FromObject(newDocument), new RavenJObject { { Constants.RavenEntityName, "FooDocumentWithIdProperty" } }); using (var session = store.OpenSession()) { var fetchedDocument = session.Load <FooDocumentWithIdProperty>(TEST_DOCUMENT_ID); Assert.NotNull(fetchedDocument); } } }