public void RavenDbSessionShouldSaveEntityWithStringId() { var entityWithStringId = new EntityWithStringId(); _session.Save(entityWithStringId); entityWithStringId.Id.Should().Be("EntityWithStringIds/1"); }
public void entity_with_string_id_can_be_persisted_and_retreieved() { var entityWithStringId = new EntityWithStringId("string id"); UnitOfWork.Save <EntityWithStringId, string>(entityWithStringId); UnitOfWork.Clear(); var fetchedEntityWithStringId = UnitOfWork.Get <EntityWithStringId, string>(entityWithStringId.Id); (fetchedEntityWithStringId == entityWithStringId).ShouldBeTrue(); (fetchedEntityWithStringId.Id == entityWithStringId.Id).ShouldBeTrue(); }