adapdev-commits Mailing List for Adapdev.NET
Status: Beta
Brought to you by:
intesar66
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(26) |
Apr
(59) |
May
(37) |
Jun
(53) |
Jul
(13) |
Aug
(7) |
Sep
(5) |
Oct
(74) |
Nov
(404) |
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(10) |
Feb
(26) |
Mar
(64) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/226 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/lib/nunit/226 Added Files: mock-assembly.dll nonamespace-assembly.dll notestfixtures-assembly.dll nunit-console-runner.dll nunit-console.tests.dll nunit-gui-runner.dll nunit-gui.tests.dll nunit-test-server.dll nunit.core.dll nunit.core.extensions.dll nunit.extensions.tests.dll nunit.framework.tests.dll nunit.framework.tests.dll.config nunit.mocks.dll nunit.mocks.tests.dll nunit.testutilities.dll nunit.uikit.dll nunit.uikit.tests.dll nunit.util.dll nunit.util.tests.dll timing-tests.dll Log Message: --- NEW FILE: nonamespace-assembly.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: notestfixtures-assembly.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.uikit.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-gui-runner.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-test-server.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.testutilities.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: timing-tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.framework.tests.dll.config --- <?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- This is the configuration file for the NUnitTests.nunit test project. You may need to create a similar configuration file for your own test project. In your own configuration file, the include any appSettings that you require. The <NUnit> section is only needed if you want to use a non-default value for any of the settings. --> <configSections> <sectionGroup name="NUnit"> <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler"/> <section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/> </sectionGroup> </configSections> <appSettings> <!-- User application and configured property settings go here.--> <!-- Example: <add key="settingName" value="settingValue"/> --> <add key="test.setting" value="54321" /> </appSettings> <NUnit> <TestCaseBuilder> <!-- Set to true to recognize old style test cases starting with "Test..." --> <add key="OldStyleTestCases" value="false" /> </TestCaseBuilder> <TestRunner> <!-- Valid values are STA,MTA. Others ignored. --> <add key="ApartmentState" value="MTA" /> <!-- See ThreadPriority enum for other valid values --> <add key="ThreadPriority" value="Normal" /> </TestRunner> </NUnit> <!-- The following <runtime> section allows running nunit tests under .NET 1.0 by redirecting assemblies. The appliesTo attribute causes the section to be ignored except under .NET 1.0. --> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" /> <bindingRedirect oldVersion="2.1.4.0 - 2.2.6.99999" newVersion="2.2.7.0"/> </dependentAssembly> </assemblyBinding> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705"> <dependentAssembly> <assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture=""/> <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture=""/> <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture=""/> <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture=""/> <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture=""/> <bindingRedirect oldVersion="1.0.5000.0" newVersion="1.0.3300.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration> --- NEW FILE: nunit.extensions.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-gui.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.core.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-console-runner.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.framework.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.core.extensions.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-console.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.util.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.util.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mock-assembly.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.mocks.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.mocks.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.uikit.dll --- (This appears to be a binary file; contents omitted.) |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:58
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.UnitTest.Core Modified Files: LocalSeparateTestEngine.cs LocalTestEngine.cs TestRunner.cs TestSuiteBuilder.cs Log Message: Index: TestSuiteBuilder.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestSuiteBuilder.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TestSuiteBuilder.cs 1 Mar 2006 01:38:51 -0000 1.19 --- TestSuiteBuilder.cs 29 Mar 2006 05:30:53 -0000 1.20 *************** *** 1,4 **** --- 1,5 ---- using System.Collections.Specialized; using System.Diagnostics; + using System.Text; using Adapdev.Reflection; *************** *** 55,58 **** --- 56,60 ---- // create the logger private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private StringBuilder sb = new StringBuilder(); public static string DependencyLog = String.Empty; *************** *** 68,74 **** ts.AddTestAssembly(this.BuildAssembly(assemblyName)); } ! catch(FileNotFoundException) { ! log.Error("Assembly couldn't be found: " + assemblyName); } } --- 70,76 ---- ts.AddTestAssembly(this.BuildAssembly(assemblyName)); } ! catch(FileNotFoundException ex) { ! //sb.Append("Assembly couldn't be found: " + assemblyName + Environment.NewLine); } } *************** *** 88,94 **** string orig = Environment.CurrentDirectory; Environment.CurrentDirectory = fi.DirectoryName; ! //Console.WriteLine("Building assembly: " + assemblyName); ! //Console.WriteLine("Environment Directory: " + orig); ! //Console.WriteLine("Assembly Directory: " + fi.DirectoryName); // add the assembly to the AssemblyCache --- 90,96 ---- string orig = Environment.CurrentDirectory; Environment.CurrentDirectory = fi.DirectoryName; ! //sb.Append("Building assembly: " + assemblyName + Environment.NewLine); ! //sb.Append("Environment Directory: " + orig + Environment.NewLine); ! //sb.Append("Assembly Directory: " + fi.DirectoryName + Environment.NewLine); // add the assembly to the AssemblyCache *************** *** 117,121 **** // restore the original environment Environment.CurrentDirectory = orig; ! //Console.WriteLine(ta.ToString()); } catch (Exception e) --- 119,123 ---- // restore the original environment Environment.CurrentDirectory = orig; ! //////sb.Append(ta.ToString()); } catch (Exception e) *************** *** 133,137 **** try { ! //Console.WriteLine("Building TestFixture " + t.FullName); // Build the TestFixture --- 135,139 ---- try { ! //////sb.Append("Building TestFixture " + t.FullName); // Build the TestFixture *************** *** 158,162 **** || md.Contains("NUnit.Framework.TestAttribute")) { ! //Console.WriteLine("Building Test " + mi.Name); tf.AddTest(this.BuildTest(mi, tf)); } --- 160,164 ---- || md.Contains("NUnit.Framework.TestAttribute")) { ! //////sb.Append("Building Test " + mi.Name); tf.AddTest(this.BuildTest(mi, tf)); } *************** *** 164,168 **** || md.Contains("NUnit.Framework.TestFixtureSetUpAttribute")) { ! //Console.WriteLine("Building TestFixtureSetUp " + mi.Name); tf.AddFixtureSetUp(this.BuildBaseTestHelper(mi, tf)); } --- 166,170 ---- || md.Contains("NUnit.Framework.TestFixtureSetUpAttribute")) { ! //////sb.Append("Building TestFixtureSetUp " + mi.Name); tf.AddFixtureSetUp(this.BuildBaseTestHelper(mi, tf)); } *************** *** 170,174 **** || md.Contains("NUnit.Framework.TestFixtureTearDownAttribute")) { ! //Console.WriteLine("Building TestFixtureTearDown " + mi.Name); tf.AddFixtureTearDown(this.BuildBaseTestHelper(mi, tf)); } --- 172,176 ---- || md.Contains("NUnit.Framework.TestFixtureTearDownAttribute")) { ! //////sb.Append("Building TestFixtureTearDown " + mi.Name); tf.AddFixtureTearDown(this.BuildBaseTestHelper(mi, tf)); } *************** *** 178,182 **** ) { ! //Console.WriteLine("Building TestSetUp " + mi.Name); tf.AddTestSetUp(this.BuildTestHelper(md, mi, tf)); } --- 180,184 ---- ) { ! //////sb.Append("Building TestSetUp " + mi.Name); tf.AddTestSetUp(this.BuildTestHelper(md, mi, tf)); } *************** *** 186,194 **** ) { ! //Console.WriteLine("Building TestTearDown " + mi.Name); tf.AddTestTearDown(this.BuildTestHelper(md, mi, tf)); } } ! //Console.WriteLine(tf.ToString()); } catch(Exception ex) --- 188,196 ---- ) { ! //////sb.Append("Building TestTearDown " + mi.Name); tf.AddTestTearDown(this.BuildTestHelper(md, mi, tf)); } } ! //////sb.Append(tf.ToString()); } catch(Exception ex) *************** *** 218,222 **** this.ProcessTransactionAttribute(md, m, t); ! //Console.WriteLine("Test built: " + t.ToString()); return t; } --- 220,224 ---- this.ProcessTransactionAttribute(md, m, t); ! //////sb.Append("Test built: " + t.ToString()); return t; } *************** *** 395,402 **** string lostNamespace = args.Name.Split((",").ToCharArray())[0]; string lostAssemblyFilename = Path.Combine(Environment.CurrentDirectory, lostNamespace + ".dll"); ! //Console.WriteLine("Not found. Trying to resolve " + lostAssemblyFilename); ! Assembly a = Assembly.LoadFile(lostAssemblyFilename); ! //if(a != null) //Console.WriteLine("Found. Loaded " + a.GetName().Name + " - " + a.GetName().Version + " - " + a.Location); return a; --- 397,414 ---- string lostNamespace = args.Name.Split((",").ToCharArray())[0]; string lostAssemblyFilename = Path.Combine(Environment.CurrentDirectory, lostNamespace + ".dll"); + Assembly a = null; ! //sb.Append("Not found. Trying to resolve " + lostAssemblyFilename + Environment.NewLine); ! try ! { ! a = Assembly.LoadFile(lostAssemblyFilename); ! //if(a != null) ! //sb.Append("Found. Loaded " + a.GetName().Name + " - " + a.GetName().Version + " - " + a.Location + Environment.NewLine); ! } ! catch(Exception ex) ! { ! //sb.Append("Couldn't find: " + lostAssemblyFilename + Environment.NewLine); ! //sb.Append(ex.Message + Environment.NewLine); ! } return a; *************** *** 406,410 **** { AssemblyName assemblyName = assembly.GetName(); ! //Console.WriteLine("Probing for: " + assemblyName); if (! dependencyList.Contains(assemblyName.FullName)) { --- 418,422 ---- { AssemblyName assemblyName = assembly.GetName(); ! ////sb.Append("Probing for: " + assemblyName + Environment.NewLine); if (! dependencyList.Contains(assemblyName.FullName)) { *************** *** 419,423 **** catch (Exception ex) { ! Console.Write(ex.Message); } } --- 431,435 ---- catch (Exception ex) { ! //sb.Append("Error: " + ex.Message + Environment.NewLine); } } *************** *** 427,431 **** public void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args) { ! //Console.WriteLine("Loading: " + args.LoadedAssembly.FullName); } } --- 439,448 ---- public void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args) { ! //sb.Append("Loading: " + args.LoadedAssembly.FullName + Environment.NewLine); ! } ! ! public string Log ! { ! get{return this.sb.ToString();} } } Index: LocalTestEngine.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/LocalTestEngine.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LocalTestEngine.cs 16 Nov 2005 07:01:53 -0000 1.6 --- LocalTestEngine.cs 29 Mar 2006 05:30:53 -0000 1.7 *************** *** 15,18 **** --- 15,19 ---- private string assembly; private TestEventDispatcher dispatcher = null; + private string _log = String.Empty; public LocalTestEngine(string assembly) *************** *** 48,52 **** { TestSuiteBuilder builder = new TestSuiteBuilder(); ! return builder.BuildAssemblies(this.assembly); } --- 49,55 ---- { TestSuiteBuilder builder = new TestSuiteBuilder(); ! TestSuite ts = builder.BuildAssemblies(this.assembly); ! this._log = builder.Log; ! return ts; } *************** *** 54,58 **** { TestSuiteBuilder builder = new TestSuiteBuilder(); ! return builder.BuildAssembly(this.assembly); } --- 57,63 ---- { TestSuiteBuilder builder = new TestSuiteBuilder(); ! TestAssembly ta = builder.BuildAssembly(this.assembly); ! this._log = builder.Log; ! return ta; } *************** *** 91,94 **** --- 96,104 ---- } + public string Log + { + get { return this._log; } + } + } } Index: LocalSeparateTestEngine.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/LocalSeparateTestEngine.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LocalSeparateTestEngine.cs 26 Nov 2005 08:09:23 -0000 1.6 --- LocalSeparateTestEngine.cs 29 Mar 2006 05:30:53 -0000 1.7 *************** *** 17,20 **** --- 17,21 ---- private bool unloaded = false; private readonly string testlib = Assembly.GetExecutingAssembly().GetName().FullName; + private string _log = String.Empty; public LocalSeparateTestEngine(string assembly) : this(AppDomain.CurrentDomain.BaseDirectory, assembly){} Index: TestRunner.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestRunner.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TestRunner.cs 3 Mar 2006 05:22:55 -0000 1.15 --- TestRunner.cs 29 Mar 2006 05:30:53 -0000 1.16 *************** *** 135,140 **** tar.Location = ta.Location; - if(this._debugMode) log.Debug("Running TA " + ta.Name); - if(_dispatcher != null) _dispatcher.OnTestAssemblyStarted(new TestAssemblyEventArgs(ta)); for (int i = 1; i <= ta.RepeatCount; i++) --- 135,138 ---- *************** *** 142,160 **** if (ta.RepeatDelay > 0) Thread.Sleep(ta.RepeatDelay); TestAssemblyIteration tai = new TestAssemblyIteration(); if(_dispatcher != null)this._dispatcher.OnTestAssemblyIterationStarted(new TestAssemblyEventArgs(ta)); foreach (TestFixture tf in ta.GetTestFixtures()) { ! if (tf.ShouldRun && !tf.Ignore) { ! TestFixtureResult tfr = this.Run(tf); ! tai.AddTestResult(tfr); } } if(_dispatcher != null)_dispatcher.OnTestAssemblyIterationCompleted(new TestAssemblyIterationEventArgs(tai)); tai.Iteration = i; tar.AddIteration(tai); } ! if(_dispatcher != null)_dispatcher.OnTestAssemblyCompleted(new TestAssemblyResultEventArgs(tar)); Environment.CurrentDirectory = orig; return tar; --- 140,165 ---- if (ta.RepeatDelay > 0) Thread.Sleep(ta.RepeatDelay); TestAssemblyIteration tai = new TestAssemblyIteration(); + if(_dispatcher != null)this._dispatcher.OnTestAssemblyIterationStarted(new TestAssemblyEventArgs(ta)); foreach (TestFixture tf in ta.GetTestFixtures()) { ! if (tf != null && tf.ShouldRun && !tf.Ignore) { ! TestFixtureResult tfr = this.Run(tf); ! tai.AddTestResult(tfr); } } + if(_dispatcher != null)_dispatcher.OnTestAssemblyIterationCompleted(new TestAssemblyIterationEventArgs(tai)); + + tai.Iteration = i; tar.AddIteration(tai); } ! ! try{if(_dispatcher != null)_dispatcher.OnTestAssemblyCompleted(new TestAssemblyResultEventArgs(tar));} ! catch(Exception){} ! Environment.CurrentDirectory = orig; return tar; *************** *** 173,183 **** Assembly a = AssemblyCache.Get(tf.Parent.OriginalPath); - if(this._debugMode) log.Debug("Running TF " + tf.Name); - RunTestFixture(tf, a, classname, testFixtureResult); } catch (Exception e) { ! Console.Write(e); } return testFixtureResult; --- 178,186 ---- Assembly a = AssemblyCache.Get(tf.Parent.OriginalPath); RunTestFixture(tf, a, classname, testFixtureResult); } catch (Exception e) { ! testFixtureResult.State = TestState.Fail; } return testFixtureResult; |
Update of /cvsroot/adapdev/Adapdev/lib/nunit/227 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/lib/nunit/227 Added Files: mock-assembly.dll nonamespace-assembly.dll notestfixtures-assembly.dll nunit-console-runner.dll nunit-console.tests.dll nunit-gui-runner.dll nunit-gui.tests.dll nunit-server.tests.dll nunit-test-server.dll nunit.core.dll nunit.core.extensions.dll nunit.extensions.tests.dll nunit.framework.dll nunit.framework.tests.dll nunit.mocks.dll nunit.mocks.tests.dll nunit.uikit.dll nunit.uikit.tests.dll nunit.util.dll nunit.util.tests.dll test-utilities.dll timing-tests.dll Log Message: --- NEW FILE: nunit.uikit.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.framework.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-gui-runner.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.core.extensions.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.util.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.framework.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-test-server.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-gui.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-console.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.uikit.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.util.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.mocks.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mock-assembly.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.extensions.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.core.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nonamespace-assembly.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit.mocks.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: test-utilities.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: notestfixtures-assembly.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: timing-tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-server.tests.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: nunit-console-runner.dll --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.CodeGen Modified Files: Adapdev.CodeGen.csproj CodeGenerator.cs INVelocityTemplate.cs NVelocityCodeTemplate.cs NVelocityTableCodeTemplate.cs Added Files: NVelocityTemplate.cs Log Message: Index: Adapdev.CodeGen.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen/Adapdev.CodeGen.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Adapdev.CodeGen.csproj 16 Nov 2005 07:01:47 -0000 1.7 --- Adapdev.CodeGen.csproj 29 Mar 2006 05:30:53 -0000 1.8 *************** *** 212,215 **** --- 212,220 ---- /> <File + RelPath = "NVelocityTemplate.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "TableCodeDomTemplate.cs" SubType = "Code" Index: CodeGenerator.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen/CodeGenerator.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CodeGenerator.cs 16 Nov 2005 07:01:47 -0000 1.5 --- CodeGenerator.cs 29 Mar 2006 05:30:53 -0000 1.6 *************** *** 102,105 **** --- 102,145 ---- /// <summary> + /// Processes the I code DOM template. + /// </summary> + /// <param name="template">The template.</param> + /// <param name="codeType">Type of the code.</param> + /// <param name="refAssemblies">The ref assemblies.</param> + /// <returns></returns> + public string ProcessICodeDomTemplate(ICodeDomTemplate template, LanguageType codeType, params string[] refAssemblies) + { + CodeCompileUnit ccu = template.GetCodeCompileUnit(); + string output = String.Empty; + + foreach(string s in refAssemblies) + { + ccu.ReferencedAssemblies.Add(s); + } + + if (ccu != null) + { + // Obtains an ICodeGenerator from a CodeDomProvider class. + CodeDomProvider provider = CodeProviderFactory.GetCodeProvider(codeType); + ICodeGenerator gen = provider.CreateGenerator(); + + // Creates a StreamWriter to an output file. + using(StringWriter sw = new StringWriter()) + { + // Generates source code using the code generator. + gen.GenerateCodeFromCompileUnit(ccu, sw, new CodeGeneratorOptions()); + output = sw.GetStringBuilder().ToString(); + } + + // Process any custom code + template.ProcessCustomCode(); + } + this.OnICodeDomTemplateProcessed(new ICodeDomTemplateEventArgs(template)); + + return output; + } + + + /// <summary> /// Processes the <see cref="ICodeTemplate"/> to a file. /// </summary> Index: NVelocityCodeTemplate.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen/NVelocityCodeTemplate.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NVelocityCodeTemplate.cs 16 Nov 2005 07:01:47 -0000 1.6 --- NVelocityCodeTemplate.cs 29 Mar 2006 05:30:53 -0000 1.7 *************** *** 107,110 **** --- 107,129 ---- } + /// <summary> + /// Adds the context. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="value">The value.</param> + public void AddContext(string key, object value) + { + this.context.Put(key, value); + } + + /// <summary> + /// Gets the output. + /// </summary> + /// <returns></returns> + public string GetOutput() + { + return this.GetCode(); + } + public string GetConversionExpression(string objectType) { --- NEW FILE: NVelocityTemplate.cs --- using System; using System.IO; using Adapdev.IO; using NVelocity; using NVelocity.App; namespace Adapdev.CodeGen { /// <summary> /// Summary description for NVelocityTemplate. /// </summary> public class NVelocityTemplate : INVelocityTemplate { protected VelocityContext context = null; protected string content = String.Empty; public NVelocityTemplate() { if (!File.Exists("nvelocity.properties")) File.Copy(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "nvelocity.properties"), Path.Combine(".", "nvelocity.properties"), true); if (!File.Exists("directive.properties")) File.Copy(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "directive.properties"), Path.Combine(".", "directive.properties"), true); Velocity.Init("nvelocity.properties"); context = new VelocityContext(); } public void SetFileTemplate(string filePath) { if(!File.Exists(filePath)) throw new FileNotFoundException("Couldn't find file.", filePath); else this.content = FileUtil.ReadFile(filePath); } public void SetTemplate(string content) { this.content = content; } #region INVelocityTemplate Members public NVelocity.VelocityContext Context { get { return this.context; } } public void AddContext(string key, object value) { this.context.Put(key, value); } public string GetOutput() { if(this.content.Length > 0) { context.Put("template", this); StringWriter writer = new StringWriter(); Velocity.Evaluate(context, writer, "output", this.content); return writer.GetStringBuilder().ToString(); } else { return String.Empty; } } #endregion } } Index: INVelocityTemplate.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen/INVelocityTemplate.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** INVelocityTemplate.cs 16 Nov 2005 07:01:47 -0000 1.5 --- INVelocityTemplate.cs 29 Mar 2006 05:30:53 -0000 1.6 *************** *** 14,17 **** --- 14,28 ---- /// <value></value> VelocityContext Context{get;} + /// <summary> + /// Adds the context. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="value">The value.</param> + void AddContext(string key, object value); + /// <summary> + /// Gets the output. + /// </summary> + /// <returns></returns> + string GetOutput(); } } Index: NVelocityTableCodeTemplate.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen/NVelocityTableCodeTemplate.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NVelocityTableCodeTemplate.cs 3 Mar 2006 05:22:54 -0000 1.14 --- NVelocityTableCodeTemplate.cs 29 Mar 2006 05:30:53 -0000 1.15 *************** *** 362,365 **** --- 362,384 ---- } + /// <summary> + /// Adds the context. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="value">The value.</param> + public void AddContext(string key, object value) + { + this.context.Put(key, value); + } + + /// <summary> + /// Gets the output. + /// </summary> + /// <returns></returns> + public string GetOutput() + { + return this.GetCode(); + } + public string GetConversionExpression(string objectType) { |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:57
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.UnitTest Added Files: AssemblyInfo.cs Log Message: --- NEW FILE: AssemblyInfo.cs --- using System; using System.Reflection; [assembly: AssemblyTitle("Adapdev.UnitTest")] |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:57
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/obj/Release In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.Data/obj/Release Added Files: Adapdev.Data.projdata Log Message: --- NEW FILE: Adapdev.Data.projdata --- (This appears to be a binary file; contents omitted.) |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:57
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.Data.Tests/data Added Files: ASPNETDB.MDF aspnetdb_log.ldf codustest.mdb Log Message: --- NEW FILE: aspnetdb_log.ldf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: codustest.mdb --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ASPNETDB.MDF --- (This appears to be a binary file; contents omitted.) |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:57
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Tests/XPath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.Tests/XPath Modified Files: XPathObjectNavigatorTest.cs Log Message: Index: XPathObjectNavigatorTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Tests/XPath/XPathObjectNavigatorTest.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** XPathObjectNavigatorTest.cs 15 Mar 2006 04:34:20 -0000 1.7 --- XPathObjectNavigatorTest.cs 29 Mar 2006 05:30:53 -0000 1.8 *************** *** 121,124 **** --- 121,126 ---- XPathObjectNavigator navigator = new XPathObjectNavigator(orders, "Orders"); Assert.AreEqual(2, navigator.Select("//Order").Count); + Assert.AreEqual(4, navigator.Select("//OrderItem").Count); + Assert.AreEqual(2, navigator.Select("//OrderItem[Quantity=1]").Count); Assert.AreEqual(2, navigator.Select("Order").Count); Assert.AreEqual(o1, navigator.SelectObject("Order[1]")); |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:57
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.UnitTest.Core.Tests Modified Files: NUnitLocalSeparateTestEngineTest.cs NUnitLocalTestEngineTest.cs Log Message: Index: NUnitLocalTestEngineTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests/NUnitLocalTestEngineTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NUnitLocalTestEngineTest.cs 16 Nov 2005 07:01:53 -0000 1.4 --- NUnitLocalTestEngineTest.cs 29 Mar 2006 05:30:53 -0000 1.5 *************** *** 17,20 **** --- 17,40 ---- [Test] + public void LoadNUnit2_2_7() + { + Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); + ITestEngine engine = TestEngineFactory.CreateLocal(basedir + @"\nunit\227\nunit.framework.tests.dll"); + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + + [Test] + public void LoadNUnit2_2_6() + { + Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); + ITestEngine engine = TestEngineFactory.CreateLocal(basedir + @"\nunit\226\nunit.framework.tests.dll"); + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + + [Test] public void LoadNUnit2_2_2() { Index: NUnitLocalSeparateTestEngineTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests/NUnitLocalSeparateTestEngineTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NUnitLocalSeparateTestEngineTest.cs 16 Nov 2005 07:01:53 -0000 1.4 --- NUnitLocalSeparateTestEngineTest.cs 29 Mar 2006 05:30:53 -0000 1.5 *************** *** 16,19 **** --- 16,42 ---- private static readonly string basedir = @AppDomain.CurrentDomain.BaseDirectory; + + [Test] + public void LoadNUnit2_2_7() + { + using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\227\nunit.framework.tests.dll.config", basedir + @"\nunit\227\nunit.framework.tests.dll")) + { + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + } + + [Test] + public void LoadNUnit2_2_6() + { + using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\226\nunit.framework.tests.dll.config", basedir + @"\nunit\226\nunit.framework.tests.dll")) + { + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + } + } + [Test] public void LoadNUnit2_2_2() *************** *** 21,24 **** --- 44,48 ---- using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\222\nunit.framework.tests.dll.config", basedir + @"\nunit\222\nunit.framework.tests.dll")) { + Assert.AreEqual(basedir + @"\nunit\222\nunit.framework.tests.dll.config", engine.ConfigurationFile, "Configuration file was not automatically detected."); Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); TestAssembly assembly = engine.GetTestAssembly(); *************** *** 38,48 **** } ! [Test] public void RunNUnit2_2_2() { using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\222\nunit.framework.tests.dll.config", basedir + @"\nunit\222\nunit.framework.tests.dll")) { Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); TestAssembly assembly = engine.GetTestAssembly(); Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); --- 62,90 ---- } ! [Test,Ignore("")] public void RunNUnit2_2_2() { + TestEventDispatcher disp = new TestEventDispatcher(); + disp.BaseTestHelperStarted+=new BaseTestHelperStartedEventHandler(disp_BaseTestHelperStarted); + disp.TestAssemblyCompleted+=new TestAssemblyCompletedEventHandler(disp_TestAssemblyCompleted); + disp.TestAssemblyIterationCompleted+=new TestAssemblyIterationCompletedEventHandler(disp_TestAssemblyIterationCompleted); + disp.TestAssemblyIterationStarted+=new TestAssemblyIterationStartedEventHandler(disp_TestAssemblyIterationStarted); + disp.TestAssemblyStarted+=new TestAssemblyStartedEventHandler(disp_TestAssemblyStarted); + disp.TestCompleted+=new TestCompletedEventHandler(disp_TestCompleted); + disp.TestFixtureCompleted+=new TestFixtureCompletedEventHandler(disp_TestFixtureCompleted); + disp.TestFixtureIterationCompleted+=new TestFixtureIterationCompletedEventHandler(disp_TestFixtureIterationCompleted); + disp.TestFixtureIterationStarted+=new TestFixtureIterationStartedEventHandler(disp_TestFixtureIterationStarted); + disp.TestStarted+=new TestStartedEventHandler(disp_TestStarted); + disp.TestSuiteCompleted+=new TestSuiteCompletedEventHandler(disp_TestSuiteCompleted); + disp.TestIterationCompleted+=new TestIterationCompletedEventHandler(disp_TestIterationCompleted); + disp.TestIterationStarted+=new TestIterationStartedEventHandler(disp_TestIterationStarted); + using(ITestEngine engine = TestEngineFactory.CreateLocalSeparate(basedir, basedir + @"\nunit\222\nunit.framework.tests.dll.config", basedir + @"\nunit\222\nunit.framework.tests.dll")) { + engine.SetTestEventDispatcher(disp); Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); TestAssembly assembly = engine.GetTestAssembly(); + Console.WriteLine(engine.ConfigurationFile); + Console.WriteLine(Environment.CurrentDirectory); Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); *************** *** 88,91 **** --- 130,200 ---- } + + + private void disp_TestAssemblyCompleted(object sender, TestAssemblyResultEventArgs e) + { + Console.WriteLine("disp_TestAssemblyCompleted"); + } + + private void disp_BaseTestHelperStarted(object sender, BaseTestHelperEventArgs e) + { + Console.WriteLine(e.BaseTestHelper.Method + " - " + e.BaseTestHelper.Name); + //Console.WriteLine("disp_BaseTestHelperStarted"); + } + + private void disp_TestAssemblyIterationCompleted(object sender, TestAssemblyIterationEventArgs e) + { + Console.WriteLine("disp_TestAssemblyIterationCompleted"); + } + + private void disp_TestAssemblyIterationStarted(object sender, TestAssemblyEventArgs e) + { + //Console.WriteLine("disp_TestAssemblyIterationStarted"); + } + + private void disp_TestAssemblyStarted(object sender, TestAssemblyEventArgs e) + { + //Console.WriteLine("disp_TestAssemblyStarted"); + } + + private void disp_TestCompleted(object sender, TestResultEventArgs e) + { + //Console.WriteLine("disp_TestCompleted"); + } + + private void disp_TestFixtureCompleted(object sender, TestFixtureResultEventArgs e) + { + //Console.WriteLine("disp_TestFixtureCompleted"); + } + + private void disp_TestFixtureIterationCompleted(object sender, TestFixtureIterationEventArgs e) + { + //Console.WriteLine("disp_TestFixtureIterationCompleted"); + } + + private void disp_TestFixtureIterationStarted(object sender, TestFixtureEventArgs e) + { + //Console.WriteLine("disp_TestFixtureIterationStarted"); + } + + private void disp_TestStarted(object sender, TestEventArgs e) + { + //Console.WriteLine("disp_TestStarted"); + } + + private void disp_TestSuiteCompleted(object sender, TestAssemblyResult[] tar) + { + //Console.WriteLine("disp_TestSuiteCompleted"); + } + + private void disp_TestIterationCompleted(object sender, TestIterationEventArgs e) + { + //Console.WriteLine("disp_TestIterationCompleted"); + } + + private void disp_TestIterationStarted(object sender, TestEventArgs e) + { + //Console.WriteLine("disp_TestIterationStarted"); + } } } |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:56
|
Update of /cvsroot/adapdev/Adapdev/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/lib Modified Files: nunit.framework.dll Log Message: Index: nunit.framework.dll =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/nunit.framework.dll,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 Binary files /tmp/cvslQ3tVQ and /tmp/cvsrm0Lxs differ |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:56
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.Data.Tests Modified Files: Adapdev.Data.Tests.csproj Added Files: DataReaderDebuggerTest.cs Log Message: --- NEW FILE: DataReaderDebuggerTest.cs --- using System; using NUnit.Framework; using Adapdev.Mock; using Test; namespace Adapdev.Data.Tests { /// <summary> /// Summary description for DataReaderDebugger. /// </summary> public class DataReaderDebuggerTest { [Test, Ignore("")] public void Test() { } } } Index: Adapdev.Data.Tests.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Adapdev.Data.Tests.csproj,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Adapdev.Data.Tests.csproj 18 Mar 2006 09:59:24 -0000 1.19 --- Adapdev.Data.Tests.csproj 29 Mar 2006 05:30:53 -0000 1.20 *************** *** 131,134 **** --- 131,139 ---- /> <File + RelPath = "DataReaderDebuggerTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "ProviderInfoManagerTest.cs" SubType = "Code" |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:56
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/src/Adapdev.CodeGen.Tests Modified Files: Adapdev.CodeGen.Tests.csproj Added Files: CodeDOMSample.cs CodeGeneratorTest.cs NVelocityCodeTemplateTest.cs NVelocityTemplateTest.cs directive.properties nvelocity.properties template.t Log Message: --- NEW FILE: template.t --- Today's date is $date --- NEW FILE: directive.properties --- directive.1=NVelocity.Runtime.Directive.Foreach directive.2=NVelocity.Runtime.Directive.Include directive.3=NVelocity.Runtime.Directive.Parse directive.4=NVelocity.Runtime.Directive.Macro directive.5=NVelocity.Runtime.Directive.Literal --- NEW FILE: NVelocityTemplateTest.cs --- using System; using System.IO; using NUnit.Framework; using Adapdev.CodeGen; namespace Adapdev.CodeGen.Tests { [TestFixture] public class NVelocityTemplateTest { [Test] public void DynamicTemplate() { NVelocityTemplate template = new NVelocityTemplate(); template.AddContext("date",DateTime.Now); template.SetTemplate("Today's date is $date"); string text = template.GetOutput(); Console.WriteLine(text); Assert.IsTrue(text.IndexOf("$date") == -1); Assert.IsTrue(text.Length > 0, "No content was returned."); } [Test] public void FileTemplate() { NVelocityTemplate template = new NVelocityTemplate(); template.AddContext("date",DateTime.Now); template.SetFileTemplate("template.t"); string text = template.GetOutput(); Console.WriteLine(text); Assert.IsTrue(text.IndexOf("$date") == -1); Assert.IsTrue(text.Length > 0, "No content was returned."); } } } --- NEW FILE: nvelocity.properties --- #---------------------------------------------------------------------------- # These are the default properties for the # NVelocity Runtime. These values are used when # Runtime.init() is called, and when Runtime.init(properties) # fails to find the specificed properties file. #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # R U N T I M E L O G #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # default LogSystem to use: default: SimpleLog4NetLogSystem #---------------------------------------------------------------------------- runtime.log.logsystem.class = NVelocity.Runtime.Log.SimpleLog4NetLogSystem #--------------------------------------------------------------------------- # This is the location of the NVelocity Runtime log. #---------------------------------------------------------------------------- runtime.log = nvelocity.log #---------------------------------------------------------------------------- # This controls if Runtime.error(), info() and warn() messages include the # whole stack trace. The last property controls whether invalid references # are logged. #---------------------------------------------------------------------------- runtime.log.error.stacktrace = false runtime.log.warn.stacktrace = false runtime.log.info.stacktrace = false runtime.log.invalid.reference = true #---------------------------------------------------------------------------- # Configuration for the Log4NetLogSystem. # You must define the runtime.log.logsystem.class property to be: # NVelocity.Runtime.Log.Log4NetLogSystem # # You must also include log4net dll files into your classpath. They are # included with the Velocity distribution in the build/lib directory. # # There are several different options that you can configure. # Uncomment the ones that you want and also define their settings. #---------------------------------------------------------------------------- #runtime.log.logsystem.log4net.pattern=%d - %m%n #runtime.log.logsystem.log4net.file.size=100000 #runtime.log.logsystem.log4net.file.backups=1 #runtime.log.logsystem.log4net.syslogd.host=my.syslog.server.com #runtime.log.logsystem.log4net.syslogd.facility=LOG_DAEMON #runtime.log.logsystem.log4net.remote.host=my.remote.server.com #runtime.log.logsystem.log4net.remote.port=1099 #runtime.log.logsystem.log4net.email.server=localhost #runtime.log.logsystem.log4net.email.from=root@localhost #runtime.log.logsystem.log4net.email.to=root@localhost #runtime.log.logsystem.log4net.email.subject=NVelocity Error Report #runtime.log.logsystem.log4net.email.buffer.size=512 #---------------------------------------------------------------------------- # T E M P L A T E E N C O D I N G #---------------------------------------------------------------------------- input.encoding=ISO-8859-1 output.encoding=ISO-8859-1 #---------------------------------------------------------------------------- # F O R E A C H P R O P E R T I E S #---------------------------------------------------------------------------- # These properties control how the counter is accessed in the #foreach # directive. By default the reference $velocityCount will be available # in the body of the #foreach directive. The default starting value # for this reference is 1. #---------------------------------------------------------------------------- directive.foreach.counter.name = velocityCount directive.foreach.counter.initial.value = 1 #---------------------------------------------------------------------------- # I N C L U D E P R O P E R T I E S #---------------------------------------------------------------------------- # These are the properties that governed the way #include'd content # is governed. #---------------------------------------------------------------------------- directive.include.output.errormsg.start = <!-- include error : directive.include.output.errormsg.end = see error log --> #---------------------------------------------------------------------------- # P A R S E P R O P E R T I E S #---------------------------------------------------------------------------- directive.parse.max.depth = 10 #---------------------------------------------------------------------------- # T E M P L A T E L O A D E R S #---------------------------------------------------------------------------- # # #---------------------------------------------------------------------------- resource.loader = file file.resource.loader.description = NVelocity File Resource Loader file.resource.loader.class = NVelocity.Runtime.Resource.Loader.FileResourceLoader file.resource.loader.path = . file.resource.loader.cache = false file.resource.loader.modificationCheckInterval = 2 #---------------------------------------------------------------------------- # VELOCIMACRO PROPERTIES #---------------------------------------------------------------------------- # global : name of default global library. It is expected to be in the regular # template path. You may remove it (either the file or this property) if # you wish with no harm. #---------------------------------------------------------------------------- velocimacro.library = VM_global_library.vm velocimacro.permissions.allow.inline = true velocimacro.permissions.allow.inline.to.replace.global = false velocimacro.permissions.allow.inline.local.scope = false velocimacro.context.localscope = false #---------------------------------------------------------------------------- # INTERPOLATION #---------------------------------------------------------------------------- # turn off and on interpolation of references and directives in string # literals. ON by default :) #---------------------------------------------------------------------------- runtime.interpolate.string.literals = true #---------------------------------------------------------------------------- # RESOURCE MANAGEMENT #---------------------------------------------------------------------------- # Allows alternative ResourceManager and ResourceCache implementations # to be plugged in. #---------------------------------------------------------------------------- resource.manager.class = NVelocity.Runtime.Resource.ResourceManagerImpl resource.manager.cache.class = NVelocity.Runtime.Resource.ResourceCacheImpl --- NEW FILE: CodeDOMSample.cs --- using System; using System.CodeDom; using System.Reflection; namespace Adapdev.CodeGen.Tests { /// <summary> /// Summary description for CodeDOMSample. /// </summary> public class CodeDOMSample : ICodeDomTemplate { public CodeDOMSample() { // // TODO: Add constructor logic here // } #region ICodeDomTemplate Members public void ProcessCustomCode() { // TODO: Add CodeDOMSample.ProcessCustomCode implementation } public bool Overwrite { get { // TODO: Add CodeDOMSample.Overwrite getter implementation return false; } set { // TODO: Add CodeDOMSample.Overwrite setter implementation } } public CodeCompileUnit GetCodeCompileUnit() { CodeCompileUnit compileUnit = new CodeCompileUnit(); CodeNamespace namespace1 = new CodeNamespace("TestNamespace"); compileUnit.Namespaces.Add( namespace1 ); return compileUnit; } public string Namespace { get { // TODO: Add CodeDOMSample.Namespace getter implementation return null; } set { // TODO: Add CodeDOMSample.Namespace setter implementation } } public string FileName { get { // TODO: Add CodeDOMSample.FileName getter implementation return null; } set { // TODO: Add CodeDOMSample.FileName setter implementation } } public string OutputDirectory { get { // TODO: Add CodeDOMSample.OutputDirectory getter implementation return null; } set { // TODO: Add CodeDOMSample.OutputDirectory setter implementation } } public string ClassName { get { // TODO: Add CodeDOMSample.ClassName getter implementation return null; } set { // TODO: Add CodeDOMSample.ClassName setter implementation } } #endregion } } Index: Adapdev.CodeGen.Tests.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen.Tests/Adapdev.CodeGen.Tests.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Adapdev.CodeGen.Tests.csproj 16 Nov 2005 07:01:47 -0000 1.7 --- Adapdev.CodeGen.Tests.csproj 29 Mar 2006 05:30:53 -0000 1.8 *************** *** 17,21 **** DelaySign = "false" OutputType = "Library" ! PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "Adapdev.CodeGen.Tests" --- 17,21 ---- DelaySign = "false" OutputType = "Library" ! PreBuildEvent = "copy $(ProjectDir)*.t $(TargetDir)
copy $(ProjectDir)*.properties $(TargetDir)" PostBuildEvent = "" RootNamespace = "Adapdev.CodeGen.Tests" *************** *** 105,108 **** --- 105,140 ---- BuildAction = "Compile" /> + <File + RelPath = "CodeDOMSample.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "CodeGeneratorTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "directive.properties" + BuildAction = "None" + /> + <File + RelPath = "nvelocity.properties" + BuildAction = "None" + /> + <File + RelPath = "NVelocityCodeTemplateTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "NVelocityTemplateTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "template.t" + BuildAction = "None" + /> </Include> </Files> --- NEW FILE: CodeGeneratorTest.cs --- using System; using NUnit.Framework; using Adapdev.CodeGen; namespace Adapdev.CodeGen.Tests { [TestFixture] public class CodeGeneratorTest { [Test] public void CPPInMemory() { string output = this.InMemory(LanguageType.CPP); Console.WriteLine(output); Assert.IsTrue(output.Length > 0, "No code was generated"); Assert.IsTrue(output.IndexOf("namespace") >= 0); } [Test] public void CSharpInMemory() { string output = this.InMemory(LanguageType.CSHARP); Console.WriteLine(output); Assert.IsTrue(output.Length > 0, "No code was generated"); Assert.IsTrue(output.IndexOf("namespace") >= 0); } [Test] public void JavaInMemory() { string output = this.InMemory(LanguageType.JAVA); Console.WriteLine(output); Assert.IsTrue(output.Length > 0, "No code was generated"); Assert.IsTrue(output.IndexOf("namespace") >= 0); } [Test] public void JScriptInMemory() { string output = this.InMemory(LanguageType.JSCRIPT); Console.WriteLine(output); Assert.IsTrue(output.Length > 0, "No code was generated"); Assert.IsTrue(output.IndexOf("package") >= 0); } [Test] public void JSharpInMemory() { string output = this.InMemory(LanguageType.JSHARP); Console.WriteLine(output); Assert.IsTrue(output.Length > 0, "No code was generated"); Assert.IsTrue(output.IndexOf("package") >= 0); } [Test] public void VBNETInMemory() { string output = this.InMemory(LanguageType.VBNET); Console.WriteLine(output); Assert.IsTrue(output.Length > 0, "No code was generated"); Assert.IsTrue(output.IndexOf("Namespace") >= 0); } private string InMemory(LanguageType type) { CodeGenerator c = new CodeGenerator(AppDomain.CurrentDomain.BaseDirectory); return c.ProcessICodeDomTemplate(new CodeDOMSample(), type); } } } --- NEW FILE: NVelocityCodeTemplateTest.cs --- using System; using NUnit.Framework; using Adapdev.CodeGen; namespace Adapdev.CodeGen.Tests { [TestFixture] public class NVelocityCodeTemplateTest { [Test] public void FileTemplate() { INVelocityTemplate template = new NVelocityCodeTemplate("test","cs","template.t",AppDomain.CurrentDomain.BaseDirectory); template.AddContext("date",DateTime.Now); string text = template.GetOutput(); Assert.IsTrue(text.IndexOf("$date") == -1); Assert.IsTrue(text.Length > 0, "No content was returned."); } } } |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:56
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/222 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/lib/nunit/222 Modified Files: nunit.framework.tests.dll.config Log Message: Index: nunit.framework.tests.dll.config =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/nunit/222/nunit.framework.tests.dll.config,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** nunit.framework.tests.dll.config 30 Dec 2005 20:42:10 -0000 1.4 --- nunit.framework.tests.dll.config 29 Mar 2006 05:30:53 -0000 1.5 *************** *** 50,54 **** culture="neutral" /> <bindingRedirect oldVersion="2.1.4.0 - 2.3.5335.99999" ! newVersion="2.3.5336.0"/> </dependentAssembly> </assemblyBinding> --- 50,54 ---- culture="neutral" /> <bindingRedirect oldVersion="2.1.4.0 - 2.3.5335.99999" ! newVersion="2.2.6.0"/> </dependentAssembly> </assemblyBinding> |
|
From: Sean M. <int...@us...> - 2006-03-29 05:30:56
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/220 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30391/lib/nunit/220 Modified Files: nunit.tests.dll.config Log Message: Index: nunit.tests.dll.config =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/nunit/220/nunit.tests.dll.config,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** nunit.tests.dll.config 30 Dec 2005 20:42:10 -0000 1.4 --- nunit.tests.dll.config 29 Mar 2006 05:30:53 -0000 1.5 *************** *** 38,43 **** publicKeyToken="96d09a1eb7f44a77" culture="neutral" /> ! <bindingRedirect oldVersion="2.1.4.0 - 2.3.5335.99999" ! newVersion="2.3.5336.0"/> </dependentAssembly> </assemblyBinding> --- 38,43 ---- publicKeyToken="96d09a1eb7f44a77" culture="neutral" /> ! <bindingRedirect oldVersion="2.1.4.0 - 2.2.5335.99999" ! newVersion="2.2.6.0"/> </dependentAssembly> </assemblyBinding> |
|
From: Sean M. <int...@us...> - 2006-03-29 05:23:42
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29868/data Log Message: Directory /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/data added to the repository |
|
From: Sean M. <int...@us...> - 2006-03-29 05:23:21
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev/Diagnostics/Mock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29773/Mock Log Message: Directory /cvsroot/adapdev/Adapdev/src/Adapdev/Diagnostics/Mock added to the repository |
|
From: Sean M. <int...@us...> - 2006-03-29 05:22:56
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/227 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29420/227 Log Message: Directory /cvsroot/adapdev/Adapdev/lib/nunit/227 added to the repository |
|
From: Sean M. <int...@us...> - 2006-03-19 07:13:35
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/obj/Release In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12218/src/Adapdev.Data/obj/Release Added Files: Adapdev.Data.dll Log Message: --- NEW FILE: Adapdev.Data.dll --- (This appears to be a binary file; contents omitted.) |
|
From: Sean M. <int...@us...> - 2006-03-19 07:13:35
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12218/src/Adapdev.Data/Schema Modified Files: ColumnSchema.cs CompareDatabaseSchemas.cs Log Message: Index: ColumnSchema.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/ColumnSchema.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ColumnSchema.cs 15 Mar 2006 04:34:20 -0000 1.16 --- ColumnSchema.cs 19 Mar 2006 07:13:32 -0000 1.17 *************** *** 53,57 **** /// </summary> [XmlAttribute] ! [SchemaDataRewritableAttribute(false)] public bool IsActive { --- 53,57 ---- /// </summary> [XmlAttribute] ! [SchemaDataRewritableAttribute(true)] public bool IsActive { Index: CompareDatabaseSchemas.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/CompareDatabaseSchemas.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CompareDatabaseSchemas.cs 27 Nov 2005 06:32:43 -0000 1.8 --- CompareDatabaseSchemas.cs 19 Mar 2006 07:13:32 -0000 1.9 *************** *** 98,103 **** if(null == this._databaseSchema.GetTable(tableNameToUpdate).GetColumn(column.Name)) { ! this._savedDatabaseSchema.GetTable(tableNameToUpdate).GetColumn(column.Name).IsActive = false; ! this._savedDatabaseSchema.GetTable(tableNameToUpdate).GetColumn(column.Name).Name = SchemaConstants.REDUNDANT + column.Name; } } --- 98,109 ---- if(null == this._databaseSchema.GetTable(tableNameToUpdate).GetColumn(column.Name)) { ! // string newname = SchemaConstants.REDUNDANT + column.Name; ! string oldname = column.Name; ! // ColumnSchema c = column; ! // c.IsActive = false; ! // c.Name = newname; ! ! this._savedDatabaseSchema.GetTable(tableNameToUpdate).RemoveColumn(oldname); ! // this._savedDatabaseSchema.GetTable(tableNameToUpdate).AddColumn(c); } } *************** *** 113,118 **** if(null == this._databaseSchema.GetTable(table.Name)) { ! this._savedDatabaseSchema.GetTable(table.Name).IsActive = false; ! this._savedDatabaseSchema.GetTable(table.Name).Name = SchemaConstants.REDUNDANT + table.Name; } } --- 119,135 ---- if(null == this._databaseSchema.GetTable(table.Name)) { ! // string newname = SchemaConstants.REDUNDANT + column.Name; ! string oldname = table.Name; ! // ColumnSchema c = column; ! // c.IsActive = false; ! // c.Name = newname; ! ! this._savedDatabaseSchema.Tables.Remove(table.Name); ! // this._savedDatabaseSchema.GetTable(tableNameToUpdate).AddColumn(c); ! ! ! ! // this._savedDatabaseSchema.GetTable(table.Name).IsActive = false; ! // this._savedDatabaseSchema.GetTable(table.Name).Name = SchemaConstants.REDUNDANT + table.Name; } } |
|
From: Sean M. <int...@us...> - 2006-03-19 07:13:35
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12218/src/Adapdev.Data/Xml Modified Files: ProviderInfo.xml Log Message: Index: ProviderInfo.xml =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Xml/ProviderInfo.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ProviderInfo.xml 1 Mar 2006 01:38:51 -0000 1.12 --- ProviderInfo.xml 19 Mar 2006 07:13:32 -0000 1.13 *************** *** 607,611 **** <Postfix></Postfix> <Default>0</Default> ! <TestDefault>0.00</TestDefault> </Type> <Type> --- 607,611 ---- <Postfix></Postfix> <Default>0</Default> ! <TestDefault>0.00M</TestDefault> </Type> <Type> *************** *** 805,809 **** <Postfix></Postfix> <Default>0</Default> ! <TestDefault>0.00</TestDefault> </Type> <Type> --- 805,809 ---- <Postfix></Postfix> <Default>0</Default> ! <TestDefault>0.00M</TestDefault> </Type> <Type> |
|
From: Sean M. <int...@us...> - 2006-03-19 07:13:35
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/bin/Release In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12218/src/Adapdev.Data/bin/Release Added Files: Adapdev.Data.dll Adapdev.dll Log Message: --- NEW FILE: Adapdev.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Adapdev.Data.dll --- (This appears to be a binary file; contents omitted.) |
|
From: Sean M. <int...@us...> - 2006-03-19 07:13:34
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12218/src/Adapdev.Data.Tests/Schema Modified Files: CompareDatabaseSchemasTest.cs Log Message: Index: CompareDatabaseSchemasTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Schema/CompareDatabaseSchemasTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CompareDatabaseSchemasTest.cs 27 Nov 2005 06:32:43 -0000 1.1 --- CompareDatabaseSchemasTest.cs 19 Mar 2006 07:13:31 -0000 1.2 *************** *** 93,99 **** DatabaseSchema ds3 = compare.Compare(); ! Console.WriteLine(ds3); Assert.IsTrue(ds3.Tables.Count == 1); ! Assert.IsTrue(ds3.GetTable("Table1").Columns.Count == 1, "Removed column is still present"); } --- 93,103 ---- DatabaseSchema ds3 = compare.Compare(); ! //Console.WriteLine(ds3); ! foreach(ColumnSchema cs in ds3.GetTable("Table1").SortedColumns.Values) ! { ! Console.WriteLine(cs.Name); ! } Assert.IsTrue(ds3.Tables.Count == 1); ! Assert.IsTrue(ds3.GetTable("Table1").Columns.Count == 1); } *************** *** 126,131 **** DatabaseSchema ds3 = compare.Compare(); ! Assert.IsTrue(ds3.Tables.Count == 1); ! Assert.AreEqual("REMOVED_Table1", ds3.GetTable("Table1").Name); } --- 130,134 ---- DatabaseSchema ds3 = compare.Compare(); ! Assert.IsTrue(ds3.Tables.Count == 0); } |
|
From: Sean M. <int...@us...> - 2006-03-18 09:59:28
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13506/src/Adapdev.Data/Schema Modified Files: MySqlSchemaBuilder.cs OleDbSchemaBuilder.cs SchemaBuilder.cs TableSchema.cs Log Message: Index: MySqlSchemaBuilder.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/MySqlSchemaBuilder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MySqlSchemaBuilder.cs 16 Nov 2005 07:01:48 -0000 1.5 --- MySqlSchemaBuilder.cs 18 Mar 2006 09:59:24 -0000 1.6 *************** *** 33,36 **** --- 33,38 ---- DatabaseSchema di = new DatabaseSchema(); + di.DatabaseType = DbType.MYSQL; + di.DatabaseProviderType = DbProviderType.MYSQL; MySqlConnection c = new MySqlConnection(connectionString); di.Name = c.Database; Index: OleDbSchemaBuilder.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/OleDbSchemaBuilder.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** OleDbSchemaBuilder.cs 15 Mar 2006 04:34:20 -0000 1.10 --- OleDbSchemaBuilder.cs 18 Mar 2006 09:59:24 -0000 1.11 *************** *** 2,5 **** --- 2,6 ---- using System.Data; using System.Data.OleDb; + using System.Diagnostics; using System.Text; using Adapdev.Data.Sql; *************** *** 15,146 **** private Adapdev.Data.DbProviderType dbProviderType = DbProviderType.OLEDB; private int recordCount = 0; ! public OleDbSchemaBuilder(Adapdev.IProgressCallback callback, ref int recordCount) { this._callback = callback; this.recordCount = recordCount; } public override DatabaseSchema BuildDatabaseSchema(string connectionString, Adapdev.Data.DbType databaseType, Adapdev.Data.DbProviderType providerType, string schemaFilter) { ! DataTable schemaTables = this.GetOleDbSchema(_callback, connectionString, OleDbSchemaGuid.Tables, "",schemaFilter,"",""); DatabaseSchema di = new DatabaseSchema(); - di.DatabaseProviderType = providerType; - di.DatabaseType = databaseType; - this.dbProviderType = providerType; ! if (schemaTables != null) ! { ! if (schemaTables.Rows.Count > 0) ! { ! //TODO: Note sure if this is valid. It does not work for Oracle DB's ! di.Name = schemaTables.Rows[0]["TABLE_CATALOG"].ToString(); ! if (di.Name == String.Empty) di.Name = "Unknown"; ! ! // Build the base schema information ! if (!StartProgress(_callback, "Building Table Details",schemaTables.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in schemaTables.Rows) { ! TableType tableType = TableTypeConverter.Convert(dr["TABLE_TYPE"].ToString()); ! if (tableType == TableType.TABLE || tableType == TableType.VIEW) { ! if (!IncrProgress(_callback, dr["TABLE_NAME"].ToString(), ref recordCount)) return null; ! TableSchema ti = CreateTableSchema(dr); ! CreateColumnSchemas(ti, connectionString, databaseType); ! if(ti.Columns.Count > 0) di.AddTable(ti); } - } ! // Get the primary key information ! DataTable pkeys = this.GetOleDbSchema(_callback, connectionString, OleDbSchemaGuid.Primary_Keys, "",schemaFilter,"",""); ! if (pkeys != null) ! { ! if (!StartProgress(_callback, "Building Primary Key Details",pkeys.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in pkeys.Rows) { ! string pkTable = dr["TABLE_NAME"].ToString(); ! if (!IncrProgress(_callback, dr["TABLE_NAME"].ToString(), ref recordCount)) return null; ! ! TableSchema tip = di[pkTable]; ! if (tip != null) { ! ColumnSchema ci = tip[dr["COLUMN_NAME"].ToString()]; ! if (ci != null) { ! ci.IsPrimaryKey = true; ! tip.AddColumn(ci); } } } - } ! // Get the foreign key information ! DataTable fkeys = this.GetOleDbSchema(_callback, connectionString, OleDbSchemaGuid.Foreign_Keys, "",schemaFilter,"",""); ! if (fkeys != null) ! { ! if (!StartProgress(_callback, "Building Foreign Key Details",fkeys.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in fkeys.Rows) { ! string fkTable = dr["FK_TABLE_NAME"].ToString(); ! if (!IncrProgress(_callback, dr["FK_TABLE_NAME"].ToString(), ref recordCount)) return null; ! ! TableSchema tif = di[fkTable]; ! if (tif != null) { ! ColumnSchema ci = tif[dr["FK_COLUMN_NAME"].ToString()]; ! if (ci != null) { ! ci.IsForeignKey = true; ! tif.AddColumn(ci); } } } - } ! // Setup the Progress Display if one is defined. ! if (fkeys != null) ! { ! if (!StartProgress(_callback, "Building Foreign Key Relationships",fkeys.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in fkeys.Rows) { ! if (!IncrProgress(_callback, dr["PK_TABLE_NAME"].ToString(), ref recordCount)) return null; ! // Get the name of the primary key table ! string pkTable = dr["PK_TABLE_NAME"].ToString(); ! // Get the name of the foreign key table ! string fkTable = dr["FK_TABLE_NAME"].ToString(); ! // Get the name of the foreign key column ! string fkColumn = dr["FK_COLUMN_NAME"].ToString(); ! // Get the table containing the primary key ! TableSchema tif = di[pkTable]; ! // Get the table containing the foreign key ! TableSchema fk = di[fkTable]; ! if (tif != null) ! { ! // Get the primary key ! ColumnSchema ci = tif[dr["PK_COLUMN_NAME"].ToString()]; ! // Get the foreign key ! ColumnSchema cf = fk[fkColumn]; ! if (ci != null) { ! // Add the association to the table and column containing the foreign key ! ci.ForeignKeyTables.Add(new ForeignKeyAssociation(tif, ci, fk ,cf)); } } } ! } ! if (!EndProgress(_callback, "Finished Loading Tables",true)) return null; } else { if (!EndProgress(_callback, "No database schema information found.",false)) return null; ! } ! } ! else { ! if (!EndProgress(_callback, "No database schema information found.",false)) return null; } return di; --- 16,192 ---- private Adapdev.Data.DbProviderType dbProviderType = DbProviderType.OLEDB; private int recordCount = 0; + private readonly string oledbConnectionString; ! public OleDbSchemaBuilder(Adapdev.IProgressCallback callback, ref int recordCount, string oledbConnectionString) { this._callback = callback; this.recordCount = recordCount; + this.oledbConnectionString = oledbConnectionString; } public override DatabaseSchema BuildDatabaseSchema(string connectionString, Adapdev.Data.DbType databaseType, Adapdev.Data.DbProviderType providerType, string schemaFilter) { ! bool open = false; ! OleDbConnection connection = (OleDbConnection)DbProviderFactory.CreateConnection(DbProviderType.OLEDB); ! connection.ConnectionString = connectionString; DatabaseSchema di = new DatabaseSchema(); ! try ! { ! connection.Open(); ! open = true; ! ! DataTable schemaTables = this.GetOleDbSchema(_callback, connection, OleDbSchemaGuid.Tables, "",schemaFilter,"",""); ! di.DatabaseProviderType = providerType; ! di.DatabaseType = databaseType; ! this.dbProviderType = providerType; ! ! if (schemaTables != null) ! { ! if (schemaTables.Rows.Count > 0) { ! //TODO: Note sure if this is valid. It does not work for Oracle DB's ! di.Name = schemaTables.Rows[0]["TABLE_CATALOG"].ToString(); ! if (di.Name == String.Empty) di.Name = "Unknown"; ! ! // Build the base schema information ! if (!StartProgress(_callback, "Building Table Details",schemaTables.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in schemaTables.Rows) { ! // Only process Tables, Views and Synonyms ! TableType tableType = TableTypeConverter.Convert(dr["TABLE_TYPE"].ToString()); ! if ((tableType == TableType.TABLE || tableType == TableType.VIEW || tableType == TableType.SYNONYM)) ! { ! // Oracle will return tons of system tables ! // so for Oracle, we need to filter out tables ! // with no schema name ! bool go = true; ! switch(di.DatabaseType) ! { ! case DbType.ORACLE: ! if(dr["TABLE_SCHEMA"].ToString().Length > 0) go = true; ! else go = false; ! break; ! default: ! break; ! } ! if (!IncrProgress(_callback, dr["TABLE_NAME"].ToString(), ref recordCount)) return null; ! if(go) ! { ! TableSchema ti = CreateTableSchema(dr); ! //Debug.WriteLine(ti.Name + " -- " + ti.SchemaName); ! CreateColumnSchemas(ti, connection, databaseType); ! if(ti.Columns.Count > 0) di.AddTable(ti); ! } ! } } ! // Get the primary key information ! DataTable pkeys = this.GetOleDbSchema(_callback, connection, OleDbSchemaGuid.Primary_Keys, "",schemaFilter,"",""); ! if (pkeys != null) { ! if (!StartProgress(_callback, "Building Primary Key Details",pkeys.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in pkeys.Rows) { ! string pkTable = dr["TABLE_NAME"].ToString(); ! if (!IncrProgress(_callback, dr["TABLE_NAME"].ToString(), ref recordCount)) return null; ! ! TableSchema tip = di[pkTable]; ! if (tip != null) { ! ColumnSchema ci = tip[dr["COLUMN_NAME"].ToString()]; ! if (ci != null) ! { ! ci.IsPrimaryKey = true; ! tip.AddColumn(ci); ! } } } } ! // Get the foreign key information ! DataTable fkeys = this.GetOleDbSchema(_callback, connection, OleDbSchemaGuid.Foreign_Keys, "",schemaFilter,"",""); ! if (fkeys != null) { ! if (!StartProgress(_callback, "Building Foreign Key Details",fkeys.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in fkeys.Rows) { ! string fkTable = dr["FK_TABLE_NAME"].ToString(); ! if (!IncrProgress(_callback, dr["FK_TABLE_NAME"].ToString(), ref recordCount)) return null; ! ! TableSchema tif = di[fkTable]; ! if (tif != null) { ! ColumnSchema ci = tif[dr["FK_COLUMN_NAME"].ToString()]; ! if (ci != null) ! { ! ci.IsForeignKey = true; ! tif.AddColumn(ci); ! } } } } ! // Setup the Progress Display if one is defined. ! if (fkeys != null) { ! if (!StartProgress(_callback, "Building Foreign Key Relationships",fkeys.Rows.Count,ref recordCount)) return null; ! foreach (DataRow dr in fkeys.Rows) ! { ! if (!IncrProgress(_callback, dr["PK_TABLE_NAME"].ToString(), ref recordCount)) return null; ! // Get the name of the primary key table ! string pkTable = dr["PK_TABLE_NAME"].ToString(); ! // Get the name of the foreign key table ! string fkTable = dr["FK_TABLE_NAME"].ToString(); ! // Get the name of the foreign key column ! string fkColumn = dr["FK_COLUMN_NAME"].ToString(); ! // Get the table containing the primary key ! TableSchema tif = di[pkTable]; ! // Get the table containing the foreign key ! TableSchema fk = di[fkTable]; ! if (tif != null) { ! try ! { ! // Get the primary key ! ColumnSchema ci = tif[dr["PK_COLUMN_NAME"].ToString()]; ! // Get the foreign key ! ColumnSchema cf = fk[fkColumn]; ! if (ci != null) ! { ! // Add the association to the table and column containing the foreign key ! ci.ForeignKeyTables.Add(new ForeignKeyAssociation(tif, ci, fk ,cf)); ! } ! } ! catch (Exception ex) ! { ! Debug.WriteLine(ex.Message); ! } } } } ! if (!EndProgress(_callback, "Finished Loading Tables",true)) return null; ! } ! else ! { ! if (!EndProgress(_callback, "No database schema information found.",false)) return null; ! } } else { if (!EndProgress(_callback, "No database schema information found.",false)) return null; ! } ! } ! catch(Exception ex) { ! Debug.WriteLine(ex.Message); ! } ! finally ! { ! if(open) connection.Close(); } return di; *************** *** 162,169 **** /// </summary> /// <param name="ts">The TableSchema to add the ColumnSchema to</param> ! /// <param name="oledbConnectionString">The OleDb connectionstring to use</param> ! public void CreateColumnSchemas(TableSchema ts, string oledbConnectionString, Adapdev.Data.DbType databaseType) { ! DataTable dt = this.GetReaderSchema(oledbConnectionString, ts.Name, databaseType); if (!(dt == null)) { --- 208,215 ---- /// </summary> /// <param name="ts">The TableSchema to add the ColumnSchema to</param> ! /// <param name="connection">The OleDb connectionstring to use</param> ! private void CreateColumnSchemas(TableSchema ts, OleDbConnection connection, Adapdev.Data.DbType databaseType) { ! DataTable dt = this.GetReaderSchema(connection, ts.Name, databaseType); if (!(dt == null)) { *************** *** 196,200 **** /// Gets the OLE db schema. /// </summary> ! /// <param name="oledbConnectionString">Oledb connection string.</param> /// <param name="guid">GUID.</param> /// <param name="filterCatalog">Filter catalog.</param> --- 242,246 ---- /// Gets the OLE db schema. /// </summary> ! /// <param name="connection">An open OLEDB connection.</param> /// <param name="guid">GUID.</param> /// <param name="filterCatalog">Filter catalog.</param> *************** *** 203,221 **** /// <param name="filterType">Filter type.</param> /// <returns></returns> ! public DataTable GetOleDbSchema(Adapdev.IProgressCallback _callback, string oledbConnectionString, Guid guid, string filterCatalog, string filterSchema, string filterName, string filterType) { DataTable schemaTable = null; - OleDbConnection conn = new OleDbConnection(oledbConnectionString); - conn.Open(); try { ! schemaTable = conn.GetOleDbSchemaTable(guid, GetFilters(guid, filterCatalog, filterSchema, filterName, filterType)); } catch (Exception ex) { if (_callback != null) _callback.AddMessage(ProgressMessageTypes.Critical, "Error obtaining Schema Information: " + ex.Message); } - conn.Close(); return schemaTable; } --- 249,265 ---- /// <param name="filterType">Filter type.</param> /// <returns></returns> ! private DataTable GetOleDbSchema(Adapdev.IProgressCallback _callback, OleDbConnection connection, Guid guid, string filterCatalog, string filterSchema, string filterName, string filterType) { DataTable schemaTable = null; try { ! schemaTable = connection.GetOleDbSchemaTable(guid, GetFilters(guid, filterCatalog, filterSchema, filterName, filterType)); } catch (Exception ex) { if (_callback != null) _callback.AddMessage(ProgressMessageTypes.Critical, "Error obtaining Schema Information: " + ex.Message); + Debug.WriteLine(ex.Message); } return schemaTable; } *************** *** 241,286 **** } ! public StringBuilder PrintOleDbSchema(string oledbConnection, Guid guid, string filter) { StringBuilder sb = new StringBuilder(); ! DataTable schemaTable; ! schemaTable = GetOleDbSchema(null, oledbConnection, guid, "","","",filter); ! foreach (DataRow row in schemaTable.Rows) { ! foreach (DataColumn column in schemaTable.Columns) { ! sb.Append("\t\t" + column + " : " + row[column] + "\r\n"); } - sb.Append("\r\n"); - } ! sb.Append("\r\n\r\n"); return sb; } ! public DataTable GetReaderSchema(string oledbConnectionString, string tableName, Adapdev.Data.DbType databaseType) { ! return GetReaderSchema(new OleDbConnection(), new OleDbCommand(), oledbConnectionString, databaseType, tableName); } ! private DataTable GetReaderSchema(IDbConnection cn, IDbCommand cmd, string connectionString, Adapdev.Data.DbType databaseType, string tableName) { DataTable schemaTable = null; try { - cn.ConnectionString = connectionString; - cn.Open(); - // Please Note: Use the GetPre and GetPostDelimiters here as in the case of // Oracle using [ ] around a Column Name is not valid. cmd.Connection = cn; cmd.CommandText = "SELECT * FROM " + QueryHelper.GetPreDelimeter(databaseType) + tableName + QueryHelper.GetPostDelimeter(databaseType); ! IDataReader myReader = cmd.ExecuteReader(CommandBehavior.KeyInfo | CommandBehavior.SchemaOnly); schemaTable = myReader.GetSchemaTable(); myReader.Close(); - cn.Close(); } catch (Exception ex) --- 285,343 ---- } ! public StringBuilder PrintOleDbSchema(string oledbConnectionString, Guid guid, string filter) { + OleDbConnection connection = new OleDbConnection(oledbConnectionString); StringBuilder sb = new StringBuilder(); ! bool open = false; ! try { ! connection.Open(); ! open = true; ! ! DataTable schemaTable; ! schemaTable = GetOleDbSchema(null, connection, guid, "","","",filter); ! ! foreach (DataRow row in schemaTable.Rows) { ! foreach (DataColumn column in schemaTable.Columns) ! { ! sb.Append("\t\t" + column + " : " + row[column] + "\r\n"); ! } ! sb.Append("\r\n"); } ! sb.Append("\r\n\r\n"); ! } ! catch(Exception ex) ! { ! Debug.WriteLine(ex.Message); ! } ! finally ! { ! if(open)connection.Close(); ! } return sb; } ! private DataTable GetReaderSchema(OleDbConnection connection, string tableName, Adapdev.Data.DbType databaseType) { ! return GetReaderSchema(connection, new OleDbCommand(), oledbConnectionString, databaseType, tableName); } ! private DataTable GetReaderSchema(OleDbConnection cn, IDbCommand cmd, string connectionString, Adapdev.Data.DbType databaseType, string tableName) { DataTable schemaTable = null; try { // Please Note: Use the GetPre and GetPostDelimiters here as in the case of // Oracle using [ ] around a Column Name is not valid. cmd.Connection = cn; cmd.CommandText = "SELECT * FROM " + QueryHelper.GetPreDelimeter(databaseType) + tableName + QueryHelper.GetPostDelimeter(databaseType); ! IDataReader myReader = cmd.ExecuteReader(CommandBehavior.SchemaOnly); schemaTable = myReader.GetSchemaTable(); myReader.Close(); } catch (Exception ex) *************** *** 288,298 **** schemaTable = null; if (_callback != null) _callback.AddMessage(ProgressMessageTypes.Warning, "Could not load Column information for " + tableName + ". " + ex.Message); } return schemaTable; } ! public StringBuilder PrintOleDbSchema(string oledbConnectionString, Guid guid) { ! return PrintOleDbSchema(oledbConnectionString, guid, ""); } } --- 345,356 ---- schemaTable = null; if (_callback != null) _callback.AddMessage(ProgressMessageTypes.Warning, "Could not load Column information for " + tableName + ". " + ex.Message); + Debug.WriteLine(ex.Message); } return schemaTable; } ! public StringBuilder PrintOleDbSchema(string oleDbConnectionString, Guid guid) { ! return PrintOleDbSchema(oleDbConnectionString, guid, ""); } } Index: TableSchema.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/TableSchema.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TableSchema.cs 8 Feb 2006 03:00:00 -0000 1.14 --- TableSchema.cs 18 Mar 2006 09:59:24 -0000 1.15 *************** *** 47,51 **** public void AddColumn(ColumnSchema c) { ! this.columns[c.Name] = c; } --- 47,52 ---- public void AddColumn(ColumnSchema c) { ! if(!c.Name.Equals("ROWID")) // hack for Oracle ! this.columns[c.Name] = c; } *************** *** 75,79 **** { get { return (columns[key]); } ! set { columns[key] = value; } } --- 76,84 ---- { get { return (columns[key]); } ! set ! { ! if(!key.Equals("ROWID")) // hack for Oracle ! columns[key] = value; ! } } Index: SchemaBuilder.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/SchemaBuilder.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SchemaBuilder.cs 16 Nov 2005 07:01:48 -0000 1.14 --- SchemaBuilder.cs 18 Mar 2006 09:59:24 -0000 1.15 *************** *** 59,63 **** case DbProviderType.SQLSERVER: case DbProviderType.ORACLE: ! ds = new OleDbSchemaBuilder(_callback, ref recordCount).BuildDatabaseSchema(connectionString, databaseType, providerType, schemaFilter); break; case DbProviderType.MYSQL: --- 59,63 ---- case DbProviderType.SQLSERVER: case DbProviderType.ORACLE: ! ds = new OleDbSchemaBuilder(_callback, ref recordCount, connectionString).BuildDatabaseSchema(connectionString, databaseType, providerType, schemaFilter); break; case DbProviderType.MYSQL: |
|
From: Sean M. <int...@us...> - 2006-03-18 09:59:28
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13506/src/Adapdev.Data.Tests/Schema Modified Files: SchemaBuilderTest.cs Log Message: Index: SchemaBuilderTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Schema/SchemaBuilderTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SchemaBuilderTest.cs 15 Mar 2006 04:34:19 -0000 1.2 --- SchemaBuilderTest.cs 18 Mar 2006 09:59:24 -0000 1.3 *************** *** 16,20 **** { ! private string _oledbConnectionString = "Provider=sqloledb;Data Source=localhost;Initial Catalog=northwind;User Id=sa;Password=;"; private string _mysqlConnectionString = "Data Source=localhost;Database=codus_test;User ID=;Password=;"; --- 16,23 ---- { ! private string _oledbSqlServerConnectionString = "Provider=sqloledb;Data Source=localhost;Initial Catalog=northwind;User Id=sa;Password=;"; ! private string _oledbOracleConnectionString = "Provider=msdaora; Data Source=adapdev; Database=; User ID=hr; Password=test;"; ! private string _oledbAccessConnectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}\codustest.mdb; User ID=; Password=;", AppDomain.CurrentDomain.BaseDirectory); ! private string _oledbMSDEConnectionString = String.Format(@"Provider=SQLNCLI;Server=(local)\SQLExpress;Database=aspnetdb;Trusted_Connection=Yes;", AppDomain.CurrentDomain.BaseDirectory); private string _mysqlConnectionString = "Data Source=localhost;Database=codus_test;User ID=;Password=;"; *************** *** 22,26 **** public void BuildSqlServerOleDbSchema() { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbConnectionString, Adapdev.Data.DbType.SQLSERVER, Adapdev.Data.DbProviderType.OLEDB); Assert.AreEqual(29, ds.Tables.Count, "Northwind should have 29 tables / views."); Assert.IsTrue(ds.Tables.Contains("Orders")); --- 25,29 ---- public void BuildSqlServerOleDbSchema() { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbSqlServerConnectionString, Adapdev.Data.DbType.SQLSERVER, Adapdev.Data.DbProviderType.OLEDB); Assert.AreEqual(29, ds.Tables.Count, "Northwind should have 29 tables / views."); Assert.IsTrue(ds.Tables.Contains("Orders")); *************** *** 28,37 **** Assert.AreEqual(Adapdev.Data.DbType.SQLSERVER, ds.DatabaseType, "DataTypes don't match."); Assert.AreEqual("dbo", ds.GetTable("Orders").SchemaName); // Console.WriteLine(ds.GetTable("Orders")); ! foreach(ColumnSchema column in ds.GetTable("Orders").Columns.Values) ! { ! Console.WriteLine("{0} : {1}", column.Name, column.DataType); ! } } --- 31,96 ---- Assert.AreEqual(Adapdev.Data.DbType.SQLSERVER, ds.DatabaseType, "DataTypes don't match."); Assert.AreEqual("dbo", ds.GetTable("Orders").SchemaName); + // Console.WriteLine(ds.GetTable("Orders")); + // foreach(ColumnSchema column in ds.GetTable("Orders").Columns.Values) + // { + // Console.WriteLine("{0} : {1}", column.Name, column.DataType); + // } ! } ! ! [Test] ! public void BuildOracleOleDbSchema() ! { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbOracleConnectionString, Adapdev.Data.DbType.ORACLE, Adapdev.Data.DbProviderType.OLEDB, "HR", null); ! Assert.AreEqual(8, ds.Tables.Count, "HR should have 8 tables / views."); ! Assert.IsTrue(ds.Tables.Contains("EMPLOYEES"), "Employees table not found."); ! Assert.AreEqual(Adapdev.Data.DbProviderType.OLEDB, ds.DatabaseProviderType, "ProviderTypes don't match."); ! Assert.AreEqual(Adapdev.Data.DbType.ORACLE, ds.DatabaseType, "DataTypes don't match."); ! Assert.AreEqual("HR", ds.GetTable("EMPLOYEES").SchemaName); ! ! // Console.WriteLine(ds.GetTable("COUNTRIES")); ! // foreach(ColumnSchema column in ds.GetTable("EMPLOYEES").SortedColumns.Values) ! // { ! // Console.WriteLine("{0} : {1}", column.Name, column.DataType); ! // } ! ! } ! ! [Test] ! public void BuildAccessOleDbSchema() ! { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbAccessConnectionString, Adapdev.Data.DbType.ACCESS, Adapdev.Data.DbProviderType.OLEDB); ! Console.WriteLine(ds.Tables.Count.ToString()); ! ! Assert.AreEqual(13, ds.Tables.Count, "Access should have 8 tables / views."); ! Assert.IsTrue(ds.Tables.Contains("Text"), "Text table not found."); ! Assert.AreEqual(Adapdev.Data.DbProviderType.OLEDB, ds.DatabaseProviderType, "ProviderTypes don't match."); ! Assert.AreEqual(Adapdev.Data.DbType.ACCESS, ds.DatabaseType, "DataTypes don't match."); ! Assert.AreEqual("", ds.GetTable("Text").SchemaName); ! // Console.WriteLine(ds.GetTable("Text")); ! // foreach(ColumnSchema column in ds.GetTable("Text").SortedColumns.Values) ! // { ! // Console.WriteLine("{0} : {1}", column.Name, column.DataType); ! // } ! ! } ! ! [Test] ! public void BuildMSDEOleDbSchema() ! { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbMSDEConnectionString, Adapdev.Data.DbType.SQLSERVER, Adapdev.Data.DbProviderType.OLEDB); ! Console.WriteLine(ds.Tables.Count.ToString()); ! ! Assert.AreEqual(13, ds.Tables.Count, "Access should have 8 tables / views."); ! Assert.IsTrue(ds.Tables.Contains("Text"), "Text table not found."); ! Assert.AreEqual(Adapdev.Data.DbProviderType.OLEDB, ds.DatabaseProviderType, "ProviderTypes don't match."); ! Assert.AreEqual(Adapdev.Data.DbType.ACCESS, ds.DatabaseType, "DataTypes don't match."); ! Assert.AreEqual("", ds.GetTable("Text").SchemaName); ! // Console.WriteLine(ds.GetTable("Text")); ! // foreach(ColumnSchema column in ds.GetTable("Text").SortedColumns.Values) ! // { ! // Console.WriteLine("{0} : {1}", column.Name, column.DataType); ! // } } *************** *** 40,44 **** public void BuildSqlServerSqlSchema() { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbConnectionString, Adapdev.Data.DbType.SQLSERVER, Adapdev.Data.DbProviderType.SQLSERVER); Assert.AreEqual(29, ds.Tables.Count, "Northwind should have 29 tables / views."); Assert.IsTrue(ds.Tables.Contains("Orders")); --- 99,103 ---- public void BuildSqlServerSqlSchema() { ! DatabaseSchema ds = SchemaBuilder.CreateDatabaseSchema(this._oledbSqlServerConnectionString, Adapdev.Data.DbType.SQLSERVER, Adapdev.Data.DbProviderType.SQLSERVER); Assert.AreEqual(29, ds.Tables.Count, "Northwind should have 29 tables / views."); Assert.IsTrue(ds.Tables.Contains("Orders")); *************** *** 46,53 **** Assert.AreEqual(Adapdev.Data.DbType.SQLSERVER, ds.DatabaseType, "DataTypes don't match."); ! foreach(ColumnSchema column in ds.GetTable("Orders").Columns.Values) ! { ! Console.WriteLine("{0} : {1}", column.Name, column.DataType); ! } } --- 105,112 ---- Assert.AreEqual(Adapdev.Data.DbType.SQLSERVER, ds.DatabaseType, "DataTypes don't match."); ! // foreach(ColumnSchema column in ds.GetTable("Orders").Columns.Values) ! // { ! // Console.WriteLine("{0} : {1}", column.Name, column.DataType); ! // } } *************** *** 56,60 **** { int i = 0; ! Console.WriteLine(new OleDbSchemaBuilder(null, ref i).PrintOleDbSchema(this._oledbConnectionString, OleDbSchemaGuid.Tables, "")); } --- 115,119 ---- { int i = 0; ! Console.WriteLine(new OleDbSchemaBuilder(null, ref i, this._oledbSqlServerConnectionString).PrintOleDbSchema(this._oledbSqlServerConnectionString, OleDbSchemaGuid.Tables, "")); } *************** *** 80,84 **** public void ProviderConfig() { ProviderConfig pc = new ProviderConfig(); ! Assert.AreEqual(5 ,pc.ConnectionTypes.Count, "Should have 5 Connection Types in the ProviderConfig collection"); Assert.IsTrue(pc.ConnectionTypes.Contains("Microsoft Access"),"Could not find Microsoft Access"); Assert.IsTrue(pc.ConnectionTypes.Contains("SQL Server"),"Could not find SQL Server"); --- 139,143 ---- public void ProviderConfig() { ProviderConfig pc = new ProviderConfig(); ! Assert.AreEqual(6 ,pc.ConnectionTypes.Count, "Should have 5 Connection Types in the ProviderConfig collection"); Assert.IsTrue(pc.ConnectionTypes.Contains("Microsoft Access"),"Could not find Microsoft Access"); Assert.IsTrue(pc.ConnectionTypes.Contains("SQL Server"),"Could not find SQL Server"); |
|
From: Sean M. <int...@us...> - 2006-03-18 09:59:28
|
Update of /cvsroot/adapdev/Adapdev/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13506/src Modified Files: AdapdevAssemblyInfo.cs Log Message: Index: AdapdevAssemblyInfo.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/AdapdevAssemblyInfo.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AdapdevAssemblyInfo.cs 28 Nov 2005 23:40:24 -0000 1.12 --- AdapdevAssemblyInfo.cs 18 Mar 2006 09:59:25 -0000 1.13 *************** *** 7,11 **** // associated with an assembly. // - [assembly: AssemblyTitle("Adapdev.NET")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] --- 7,10 ---- |