public void RegisterTablePerClassHierarchy() { var entitiesTypes = new[] { typeof(MyClass1), typeof(MyClass2) }; var orm = new ObjectRelationalMapper(); orm.TablePerClassHierarchy(entitiesTypes); orm.IsTablePerClassHierarchy(typeof(MyClass1)).Should().Be(true); orm.IsTablePerClassHierarchy(typeof(MyClass2)).Should().Be(true); orm.IsTablePerConcreteClass(typeof(MyClass1)).Should().Be(false); orm.IsTablePerClass(typeof(MyClass2)).Should().Be(false); }
public void WhenExplicitExcludedThenNotTablePerClassHierarchy() { // To prevent inconsistence var orm = new ObjectRelationalMapper(); orm.TablePerClassHierarchy <ToExcludeImplEntity>(); orm.Exclude <ToExcludeImplEntity>(); orm.IsTablePerClassHierarchy(typeof(ToExcludeImplEntity)).Should().Be.False(); }
public void WhenExplicitExcludedThenNotTablePerClassHierarchy() { // To prevent inconsistence var orm = new ObjectRelationalMapper(); orm.TablePerClassHierarchy<ToExcludeImplEntity>(); orm.Exclude<ToExcludeImplEntity>(); orm.IsTablePerClassHierarchy(typeof(ToExcludeImplEntity)).Should().Be.False(); }
public void IsNotRecognizedAsTablePerHierarchy() { (typeof(TestSubEntity)).Satisfy(te => !mapper.IsTablePerClassHierarchy(te)); (typeof(TestSubSubEntity)).Satisfy(te => !mapper.IsTablePerClassHierarchy(te)); }