public void AttributeInheritanceWorks() { var mappingSource = new MindboxMappingSource(new MindboxMappingConfiguration()); var metaTable = mappingSource.GetModel(typeof(DataContext)).GetTable(typeof(TestEntity1)); Assert.IsTrue(metaTable.RowType.IsInheritanceDefault); Assert.AreEqual(2, metaTable.RowType.InheritanceTypes.Count); }
public void ConfigurationInheritanceWorks() { var configuration = new MindboxMappingConfiguration(); configuration.AddInheritance <TestEntity1, TestEntity3>("3"); var mappingSource = new MindboxMappingSource(configuration); var metaTable = mappingSource.GetModel(typeof(DataContext)).GetTable(typeof(TestEntity1)); Assert.IsTrue(metaTable.RowType.IsInheritanceDefault); Assert.AreEqual(3, metaTable.RowType.InheritanceTypes.Count); }