public void AdventureWorksIntegrationTest()
 {
     MappingGenerator gen = new MappingGenerator();
     gen.Configure(XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("NHibernate.Tool.hbm2net.Tests.Db2hbmTestAdventureWorks.xml")));
     internalStreams.Clear(); // clear all generated files...
     gen.Generate(this);
     foreach (var stream in internalStreams)
     {
         Console.WriteLine(stream.Key + ":");
         Console.WriteLine(stream.Value);
     }
 }
 public void BagCollection()
 {
     string hbm = "PropertiesAndBag.hbm.xml";
     TestHelper.BuildAssemblyFromHbm("NHibernate.DomainModel8", hbm);
     MappingGenerator gen = new MappingGenerator();
     gen.Configure(XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("NHibernate.Tool.hbm2net.Tests.Db2hbmTest8.xml")));
     string schema = GetSchemaForMSSql(hbm);
     Console.WriteLine("Generated Schema:");
     Console.Write(schema);
     internalStreams.Clear(); // clear all generated files...
     gen.Generate(this);
     Assert.IsTrue(internalStreams.ContainsKey("Simple"));
     Assert.IsTrue(internalStreams.ContainsKey("Item"));
     CheckXmlMapping(hbm, "Simple", "Item");
 }
 public void CanRunGenerator()
 {
     MappingGenerator gen = new MappingGenerator();
     gen.Configure(XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("NHibernate.Tool.hbm2net.Tests.Db2hbmConfigTemplate.xml")));
     gen.Generate(new StdoutStreamProvider());
 }
 public void UserBugNullRererenceWhenSmallIntIsKey()
 {
     CreateDbFromSchema("NHibernate.Tool.hbm2net.Tests.Schemas.UserBugNullRererenceWhenSmallIntIsKey.sql");
     MappingGenerator gen = new MappingGenerator();
     gen.Configure(XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("NHibernate.Tool.hbm2net.Tests.UserBugNullReferenceWhenSmallIntIsAKey.xml")));
     gen.Generate(new StdoutStreamProvider());
 }