Пример #1
0
        public void child_entity_is_persisted_linked_with_the_parent()
        {
            var parentEntity = new ParentEntity();

            parentEntity.AddChildEntityReferencingParentEntity();

            UnitOfWork.Save(parentEntity);
            UnitOfWork.Clear();

            parentEntity = UnitOfWork.Get <ParentEntity>(parentEntity.Id);

            parentEntity.ChildrenReferencingParent.Count().ShouldBe(1);
        }