예제 #1
0
 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));

        }
예제 #4
0
        public HierarchyArgumentTests()
        {
            mapping = DocumentMapping.For<Squad>();

            arg = new HierarchyArgument(mapping);

            mapping.AddSubClass(typeof(BasketballTeam));
            mapping.AddSubClass(typeof(BaseballTeam));
            mapping.AddSubClass(typeof(FootballTeam), "football");
        }
예제 #5
0
        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");
        }
예제 #6
0
        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);
        }