public generating_code_and_sql_for_hierarchy_smoke_Tests() { theHierarchy = DocumentMapping.For <Squad>(); theHierarchy.AddSubClass(typeof(BasketballTeam)); theHierarchy.AddSubClass(typeof(BaseballTeam)); theHierarchy.AddSubClass(typeof(FootballTeam)); }
public generating_code_and_sql_for_hierarchy_smoke_Tests_on_other_database_schema() { theHierarchy = DocumentMapping.For <Squad>("other"); theHierarchy.AddSubClass(typeof(BasketballTeam)); theHierarchy.AddSubClass(typeof(BaseballTeam)); theHierarchy.AddSubClass(typeof(FootballTeam)); }
public generating_code_and_sql_for_hierarchy_smoke_Tests() { theHierarchy = new DocumentMapping(typeof(Squad), new StoreOptions()); theHierarchy.AddSubClass(typeof(BasketballTeam)); theHierarchy.AddSubClass(typeof(BaseballTeam)); theHierarchy.AddSubClass(typeof(FootballTeam)); }
public HierarchyArgumentTests() { mapping = new DocumentMapping(typeof(Squad), new StoreOptions()); arg = new HierarchyArgument(mapping); mapping.AddSubClass(typeof(BasketballTeam)); mapping.AddSubClass(typeof(BaseballTeam)); mapping.AddSubClass(typeof(FootballTeam), "football"); }
public void can_migrate_missing_hierarchical_columns() { writeTable(); theMapping.AddSubClass(typeof(SuperUser)); var newTable = new DocumentTable(theMapping); writeAndApplyPatch(AutoCreate.CreateOrUpdate, newTable); var theActual = theTable.FetchExisting(_conn); theActual.HasColumn(DocumentMapping.DocumentTypeColumn); }
public void storage_arguments_adds_hierarchy_argument_with_subclasses() { var mapping = new DocumentMapping(typeof(Squad), new StoreOptions()); mapping.AddSubClass(typeof(FootballTeam)); mapping.ToArguments().OfType <HierarchyArgument>() .Single().Mapping.ShouldBeSameAs(mapping); }