adapdev-commits Mailing List for Adapdev.NET (Page 5)
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
|
From: Sean M. <int...@us...> - 2005-12-31 07:37:07
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784/src/Adapdev Modified Files: AssemblyCache.cs Log Message: Index: AssemblyCache.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev/AssemblyCache.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AssemblyCache.cs 16 Nov 2005 07:02:01 -0000 1.5 --- AssemblyCache.cs 31 Dec 2005 07:36:58 -0000 1.6 *************** *** 111,114 **** --- 111,115 ---- return a; } + } } \ No newline at end of file |
From: Sean M. <int...@us...> - 2005-12-30 20:42:24
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/src/Adapdev.Data/Sql Modified Files: Criteria.cs DeleteQuery.cs ICriteria.cs IQuery.cs InsertQuery.cs SelectQuery.cs UpdateQuery.cs Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: InsertQuery.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/InsertQuery.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InsertQuery.cs 16 Nov 2005 07:01:48 -0000 1.5 --- InsertQuery.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 19,23 **** protected DbProviderType provider = DbProviderType.SQLSERVER; ! public InsertQuery(DbType type, DbProviderType provider) { this.type = type; --- 19,23 ---- protected DbProviderType provider = DbProviderType.SQLSERVER; ! internal InsertQuery(DbType type, DbProviderType provider) { this.type = type; *************** *** 25,29 **** } ! public InsertQuery(DbType type, DbProviderType provider, string tableName) : this(type, provider) { this.SetTable(tableName); --- 25,29 ---- } ! internal InsertQuery(DbType type, DbProviderType provider, string tableName) : this(type, provider) { this.SetTable(tableName); *************** *** 101,104 **** --- 101,110 ---- set { this.provider = value; } } + + public ICriteria Criteria + { + get { return this.criteria; } + } + } } \ No newline at end of file Index: SelectQuery.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/SelectQuery.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SelectQuery.cs 26 Nov 2005 09:08:59 -0000 1.10 --- SelectQuery.cs 30 Dec 2005 20:42:11 -0000 1.11 *************** *** 19,23 **** protected string _join = ""; ! public SelectQuery(DbType type, DbProviderType provider) { this.type = type; --- 19,23 ---- protected string _join = ""; ! internal SelectQuery(DbType type, DbProviderType provider) { this.type = type; *************** *** 25,29 **** } ! public SelectQuery(DbType type, DbProviderType provider, string tableName): this(type, provider) { this.SetTable(tableName); --- 25,29 ---- } ! internal SelectQuery(DbType type, DbProviderType provider, string tableName): this(type, provider) { this.SetTable(tableName); *************** *** 186,189 **** --- 186,194 ---- } + public ICriteria Criteria + { + get { return criteria; } + } + public OrderBy OrderBy { Index: UpdateQuery.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/UpdateQuery.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UpdateQuery.cs 16 Nov 2005 07:01:48 -0000 1.5 --- UpdateQuery.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 15,19 **** protected DbProviderType provider = DbProviderType.SQLSERVER; ! public UpdateQuery(DbType type, DbProviderType provider) { this.type = type; --- 15,19 ---- protected DbProviderType provider = DbProviderType.SQLSERVER; ! internal UpdateQuery(DbType type, DbProviderType provider) { this.type = type; *************** *** 21,25 **** } ! public UpdateQuery(DbType type, DbProviderType provider, string tableName) : this(type, provider) { this.SetTable(tableName); --- 21,25 ---- } ! internal UpdateQuery(DbType type, DbProviderType provider, string tableName) : this(type, provider) { this.SetTable(tableName); *************** *** 72,75 **** --- 72,81 ---- set { this.provider = value; } } + + public ICriteria Criteria + { + get { return this.criteria; } + } + } } \ No newline at end of file Index: Criteria.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/Criteria.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Criteria.cs 16 Nov 2005 07:01:48 -0000 1.6 --- Criteria.cs 30 Dec 2005 20:42:11 -0000 1.7 *************** *** 1,2 **** --- 1,4 ---- + using System; + namespace Adapdev.Data.Sql { *************** *** 13,16 **** --- 15,19 ---- protected DbType type = DbType.SQLSERVER; protected DbProviderType provider = DbProviderType.SQLSERVER; + protected bool initialized = false; public Criteria(DbType type, DbProviderType provider) *************** *** 28,40 **** public void AddAnd() { ! this.AddCriteriaSeparator(CriteriaType.AND); } public virtual void AddAndCriteria(ICriteria c) { ! this.AddAnd(); ! sb.Append("("); ! sb.Append(c.GetText()); ! sb.Append(") "); } --- 31,47 ---- public void AddAnd() { ! if(this.initialized)this.AddCriteriaSeparator(CriteriaType.AND); } public virtual void AddAndCriteria(ICriteria c) { ! if(c.Initialized) ! { ! this.AddAnd(); ! sb.Append("("); ! sb.Append(c.GetText().Replace("WHERE","")); ! sb.Append(") "); ! this.initialized = true; ! } } *************** *** 56,59 **** --- 63,67 ---- sb.Append(QueryHelper.DressUp(value2,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 67,70 **** --- 75,79 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 82,85 **** --- 91,95 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 93,96 **** --- 103,107 ---- sb.Append(QueryHelper.GetParameterName(columnName, this.DbProviderType)); sb.Append(" "); + this.initialized = true; } *************** *** 108,111 **** --- 119,123 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 119,122 **** --- 131,135 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 126,129 **** --- 139,143 ---- sb.Append(subQuery.GetText()); sb.Append(") "); + this.initialized = true; } *************** *** 140,143 **** --- 154,158 ---- sb.Append(StringUtil.RemoveFinalComma(sbo.ToString())); sb.Append(") "); + this.initialized = true; } *************** *** 149,152 **** --- 164,168 ---- sb.Append(QueryHelper.GetPostDelimeter(this.type)); sb.Append(" IS NULL "); + this.initialized = true; } *************** *** 160,163 **** --- 176,180 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 171,174 **** --- 188,192 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 182,185 **** --- 200,204 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 195,198 **** --- 214,218 ---- sb.Append(QueryHelper.DressUp(value2, this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 206,209 **** --- 226,230 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 211,214 **** --- 232,236 ---- { sb.Append(" EXISTS (" + subQuery.GetText() + ") "); + this.initialized = true; } *************** *** 224,227 **** --- 246,250 ---- sb.Append(StringUtil.RemoveFinalComma(sbo.ToString())); sb.Append(")"); + this.initialized = true; } *************** *** 229,232 **** --- 252,256 ---- { sb.Append(" NOT IN (" + subQuery.GetText() + ") "); + this.initialized = true; } *************** *** 240,243 **** --- 264,268 ---- sb.Append(QueryHelper.DressUp(columnValue,this.type)); sb.Append(" "); + this.initialized = true; } *************** *** 249,263 **** sb.Append(QueryHelper.GetPostDelimeter(this.type)); sb.Append(" NOT IS NULL "); } public void AddOr() { ! this.AddCriteriaSeparator(CriteriaType.OR); } public void AddOrCriteria(ICriteria c) { ! this.AddOr(); ! sb.Append("(" + c.GetText() + ")"); } --- 274,293 ---- sb.Append(QueryHelper.GetPostDelimeter(this.type)); sb.Append(" NOT IS NULL "); + this.initialized = true; } public void AddOr() { ! if(this.initialized)this.AddCriteriaSeparator(CriteriaType.OR); } public void AddOrCriteria(ICriteria c) { ! if(c.Initialized) ! { ! this.AddOr(); ! sb.Append("(" + c.GetText().Replace("WHERE","") + ")"); ! this.initialized = true; ! } } *************** *** 265,273 **** { sb.Append(sql); } public virtual string GetText() { ! if (sb.Length > 2) { return " WHERE " + sb.ToString(); --- 295,304 ---- { sb.Append(sql); + this.initialized = true; } public virtual string GetText() { ! if (this.initialized) { return " WHERE " + sb.ToString(); *************** *** 279,282 **** --- 310,318 ---- } + public bool Initialized + { + get { return this.initialized; } + } + public DbProviderType DbProviderType { Index: DeleteQuery.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/DeleteQuery.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DeleteQuery.cs 16 Nov 2005 07:01:48 -0000 1.5 --- DeleteQuery.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 11,15 **** protected DbProviderType provider = DbProviderType.SQLSERVER; ! public DeleteQuery(DbType type, DbProviderType provider) { this.type = type; --- 11,15 ---- protected DbProviderType provider = DbProviderType.SQLSERVER; ! internal DeleteQuery(DbType type, DbProviderType provider) { this.type = type; *************** *** 17,21 **** } ! public DeleteQuery(DbType type, DbProviderType provider, string tableName) : this(type, provider) { this.SetTable(tableName); --- 17,21 ---- } ! internal DeleteQuery(DbType type, DbProviderType provider, string tableName) : this(type, provider) { this.SetTable(tableName); *************** *** 53,56 **** --- 53,62 ---- set { this.provider = value; } } + + public ICriteria Criteria + { + get { return this.criteria; } + } + } } \ No newline at end of file Index: ICriteria.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/ICriteria.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ICriteria.cs 16 Nov 2005 07:01:48 -0000 1.6 --- ICriteria.cs 30 Dec 2005 20:42:11 -0000 1.7 *************** *** 35,38 **** --- 35,39 ---- void AddSql(string sql); string GetText(); + bool Initialized{get;} DbProviderType DbProviderType { get; set; } } Index: IQuery.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/IQuery.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IQuery.cs 16 Nov 2005 07:01:48 -0000 1.5 --- IQuery.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 33,36 **** --- 33,37 ---- /// </summary> DbProviderType DbProviderType { get; set; } + ICriteria Criteria{get;} } } \ No newline at end of file |
From: Sean M. <int...@us...> - 2005-12-30 20:42:20
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/src/Adapdev.UnitTest.Core Modified Files: AbstractTest.cs RunTestIterationCommand.cs Test.cs TestAssembly.cs TestFixture.cs Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: AbstractTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/AbstractTest.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractTest.cs 27 Nov 2005 06:32:43 -0000 1.7 --- AbstractTest.cs 30 Dec 2005 20:42:11 -0000 1.8 *************** *** 1,2 **** --- 1,4 ---- + using System.ComponentModel; + #region Copyright / License Information *************** *** 67,70 **** --- 69,73 ---- } + [Browsable(false)] public int SequenceNumber { *************** *** 103,106 **** --- 106,110 ---- } + [Browsable(false)] public string Name { *************** *** 109,112 **** --- 113,117 ---- } + [Browsable(false)] public bool ShouldRun { *************** *** 115,118 **** --- 120,124 ---- } + [Browsable(false)] public bool ShouldShow { *************** *** 121,124 **** --- 127,131 ---- } + [Browsable(false)] public TestState State { *************** *** 127,130 **** --- 134,138 ---- } + [Browsable(false)] public AbstractTestResult Result { *************** *** 133,136 **** --- 141,145 ---- } + [Browsable(false)] public int Id { *************** *** 149,152 **** --- 158,162 ---- } + [Browsable(false)] public string FullName { Index: RunTestIterationCommand.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/RunTestIterationCommand.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RunTestIterationCommand.cs 30 Nov 2005 05:08:47 -0000 1.8 --- RunTestIterationCommand.cs 30 Dec 2005 20:42:11 -0000 1.9 *************** *** 77,81 **** ICommand command = new RunMethodCommand(this._method, o); if(this._test.TransactionType == TransactionType.AutoCommit) command = new AutoCommitCommand(command); ! else if(this._test.TransactionType == TransactionType.AutoRollback) command = new AutoRollbackCommand(command); command.Execute(); --- 77,81 ---- ICommand command = new RunMethodCommand(this._method, o); if(this._test.TransactionType == TransactionType.AutoCommit) command = new AutoCommitCommand(command); ! if(this._test.TransactionType == TransactionType.AutoRollback) command = new AutoRollbackCommand(command); command.Execute(); Index: TestFixture.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestFixture.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestFixture.cs 16 Nov 2005 07:01:53 -0000 1.5 --- TestFixture.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 1,2 **** --- 1,4 ---- + using System.ComponentModel; + #region Copyright / License Information *************** *** 59,62 **** --- 61,65 ---- } + [Browsable(false)] public string Namespace { *************** *** 65,68 **** --- 68,72 ---- } + [Browsable(false)] public string Class { *************** *** 71,74 **** --- 75,79 ---- } + [Browsable(false)] public TestAssembly Parent { *************** *** 132,135 **** --- 137,141 ---- } + [Browsable(false)] public ArrayList FixtureSetUps { *************** *** 138,141 **** --- 144,148 ---- } + [Browsable(false)] public ArrayList FixtureTearDowns { *************** *** 144,147 **** --- 151,155 ---- } + [Browsable(false)] public ArrayList TestSetUps { *************** *** 150,153 **** --- 158,162 ---- } + [Browsable(false)] public ArrayList TestTearDowns { Index: Test.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/Test.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Test.cs 16 Nov 2005 07:01:53 -0000 1.5 --- Test.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 1,2 **** --- 1,4 ---- + using System.ComponentModel; + #region Copyright / License Information *************** *** 84,87 **** --- 86,90 ---- } + [Browsable(false)] public bool IsFixtureSetUp { *************** *** 90,93 **** --- 93,97 ---- } + [Browsable(false)] public bool IsFixtureTearDown { *************** *** 97,100 **** --- 101,105 ---- } + [Browsable(false)] public bool IsTestSetUp { *************** *** 104,107 **** --- 109,113 ---- } + [Browsable(false)] public bool IsTestTearDown { *************** *** 110,113 **** --- 116,120 ---- } + [Browsable(false)] public TestFixture Parent { *************** *** 121,124 **** --- 128,132 ---- } + [Browsable(false)] public string Method { Index: TestAssembly.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestAssembly.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestAssembly.cs 16 Nov 2005 07:01:53 -0000 1.5 --- TestAssembly.cs 30 Dec 2005 20:42:11 -0000 1.6 *************** *** 1,2 **** --- 1,4 ---- + using System.ComponentModel; + #region Copyright / License Information *************** *** 94,97 **** --- 96,100 ---- } + [Browsable(false)] public TestSuite Parent { |
From: Sean M. <int...@us...> - 2005-12-30 20:42:19
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/235 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/lib/nunit/235 Added Files: nunit.framework.dll Log Message: Several bug fixes to the Adapdev.Data.Sql namespace --- NEW FILE: nunit.framework.dll --- (This appears to be a binary file; contents omitted.) |
From: Sean M. <int...@us...> - 2005-12-30 20:42:19
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/222 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/lib/nunit/222 Modified Files: nunit.framework.tests.dll.config Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: nunit.framework.tests.dll.config =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/nunit/222/nunit.framework.tests.dll.config,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nunit.framework.tests.dll.config 16 Nov 2005 07:05:40 -0000 1.3 --- nunit.framework.tests.dll.config 30 Dec 2005 20:42:10 -0000 1.4 *************** *** 44,51 **** --> <runtime> ! <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705"> - <dependentAssembly> <assemblyIdentity name="System" --- 44,58 ---- --> <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.3.5335.99999" ! newVersion="2.3.5336.0"/> ! </dependentAssembly> ! </assemblyBinding> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705"> <dependentAssembly> <assemblyIdentity name="System" |
From: Sean M. <int...@us...> - 2005-12-30 20:42:19
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/src/Adapdev.Data.Tests/Sql Added Files: SelectQueryTest.cs Log Message: Several bug fixes to the Adapdev.Data.Sql namespace --- NEW FILE: SelectQueryTest.cs --- using System; using Adapdev.Data.Sql; using NUnit.Framework; namespace Adapdev.Data.Tests.Sql { /// <summary> /// Summary description for SelectQueryTest. /// </summary> /// [TestFixture] public class SelectQueryTest { [Test] public void CriteriaProperty() { ISelectQuery query = QueryFactory.CreateSelectQuery(DbType.SQLSERVER, DbProviderType.SQLSERVER); query.SetTable("SomeTable"); query.Add("someColumn"); ICriteria criteria = query.CreateCriteria(); criteria.AddEqualTo("someColumn", "1"); query.SetCriteria(criteria); Assert.IsNotNull(query.Criteria); Console.WriteLine(query.GetText()); } } } |
From: Sean M. <int...@us...> - 2005-12-30 20:42:19
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/src/Adapdev.Data.Tests Modified Files: Adapdev.Data.Tests.csproj Added Files: Adapdev.Data.Tests.csproj.user Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: Adapdev.Data.Tests.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Adapdev.Data.Tests.csproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Adapdev.Data.Tests.csproj 27 Nov 2005 06:32:43 -0000 1.14 --- Adapdev.Data.Tests.csproj 30 Dec 2005 20:42:10 -0000 1.15 *************** *** 180,183 **** --- 180,188 ---- BuildAction = "Compile" /> + <File + RelPath = "Sql\SelectQueryTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> </Include> </Files> --- NEW FILE: Adapdev.Data.Tests.csproj.user --- <VisualStudioProject> <CSHARP LastOpenVersion = "7.10.3077" > <Build> <Settings ReferencePath = "D:\projects\Adapdev\Adapdev\lib\" > <Config Name = "Debug" EnableASPDebugging = "false" EnableASPXDebugging = "false" EnableUnmanagedDebugging = "false" EnableSQLServerDebugging = "false" RemoteDebugEnabled = "false" RemoteDebugMachine = "" StartAction = "Project" StartArguments = "" StartPage = "" StartProgram = "" StartURL = "" StartWorkingDirectory = "" StartWithIE = "false" /> <Config Name = "Release" EnableASPDebugging = "false" EnableASPXDebugging = "false" EnableUnmanagedDebugging = "false" EnableSQLServerDebugging = "false" RemoteDebugEnabled = "false" RemoteDebugMachine = "" StartAction = "Project" StartArguments = "" StartPage = "" StartProgram = "" StartURL = "" StartWorkingDirectory = "" StartWithIE = "false" /> </Settings> </Build> <OtherProjectSettings CopyProjectDestinationFolder = "" CopyProjectUncPath = "" CopyProjectOption = "0" ProjectView = "ShowAllFiles" ProjectTrust = "0" /> </CSHARP> </VisualStudioProject> |
From: Sean M. <int...@us...> - 2005-12-30 20:42:19
|
Update of /cvsroot/adapdev/Adapdev/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/lib Modified Files: nunit.framework.dll Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: nunit.framework.dll =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/nunit.framework.dll,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsrKxLlT and /tmp/cvs1BmpNH differ |
From: Sean M. <int...@us...> - 2005-12-30 20:42:18
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.AdapdevTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/src/Adapdev.UnitTest.Core.AdapdevTests Modified Files: RollbackTransactionTest.cs Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: RollbackTransactionTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.AdapdevTests/RollbackTransactionTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RollbackTransactionTest.cs 16 Nov 2005 07:01:53 -0000 1.3 --- RollbackTransactionTest.cs 30 Dec 2005 20:42:11 -0000 1.4 *************** *** 12,19 **** { [Test] ! // [RollbackTransaction] public void Transaction() { ! // Assert.IsTrue(ContextUtil.IsInTransaction, "Should be in a transaction."); Console.WriteLine("TransactionId: " + ContextUtil.TransactionId); } --- 12,19 ---- { [Test] ! [RollbackTransaction] public void Transaction() { ! Assert.IsTrue(ContextUtil.IsInTransaction, "Should be in a transaction."); Console.WriteLine("TransactionId: " + ContextUtil.TransactionId); } |
From: Sean M. <int...@us...> - 2005-12-30 20:42:18
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/220 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4251/lib/nunit/220 Modified Files: nunit.tests.dll.config Log Message: Several bug fixes to the Adapdev.Data.Sql namespace Index: nunit.tests.dll.config =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/nunit/220/nunit.tests.dll.config,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nunit.tests.dll.config 16 Nov 2005 07:05:40 -0000 1.3 --- nunit.tests.dll.config 30 Dec 2005 20:42:10 -0000 1.4 *************** *** 33,45 **** <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.1.65535" ! newVersion="2.2.2.0"/> </dependentAssembly> ! </assemblyBinding> </runtime> </configuration> --- 33,46 ---- <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.3.5335.99999" ! newVersion="2.3.5336.0"/> </dependentAssembly> ! </assemblyBinding> ! </runtime> </configuration> |
From: Sean M. <int...@us...> - 2005-12-30 20:41:24
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4124/Sql Log Message: Directory /cvsroot/adapdev/Adapdev/src/Adapdev.Data.Tests/Sql added to the repository |
From: Sean M. <int...@us...> - 2005-12-30 20:41:17
|
Update of /cvsroot/adapdev/Adapdev/lib/nunit/235 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4099/235 Log Message: Directory /cvsroot/adapdev/Adapdev/lib/nunit/235 added to the repository |
From: Sean M. <int...@us...> - 2005-12-09 05:30:43
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6721/src/Adapdev.Data/Schema Modified Files: ColumnSchema.cs ForeignKeyAssociation.cs LoadDatabaseSchema.cs Log Message: Fixed bug w/ NVelocity generated update statement Added support for many-to-many associations in ForeignKeyAssociation Index: ForeignKeyAssociation.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/ForeignKeyAssociation.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ForeignKeyAssociation.cs 26 Nov 2005 08:09:22 -0000 1.9 --- ForeignKeyAssociation.cs 9 Dec 2005 05:30:31 -0000 1.10 *************** *** 1,4 **** --- 1,5 ---- using System; using System.ComponentModel; + using System.Xml.Serialization; namespace Adapdev.Data.Schema *************** *** 9,20 **** /// Summary description for ForeignKeyAssociation. /// </summary> public class ForeignKeyAssociation { private TableSchema _table = null; private ColumnSchema _foreignColumn = null; private TableSchema _foreignTable = null; ! private ColumnSchema _columnSchema = null; private AssociationType _association = AssociationType.OneToMany; [Browsable(false)] public ColumnSchema ForeignColumn --- 10,58 ---- /// Summary description for ForeignKeyAssociation. /// </summary> + /// public class ForeignKeyAssociation { private TableSchema _table = null; + private ColumnSchema _columnSchema = null; private ColumnSchema _foreignColumn = null; private TableSchema _foreignTable = null; ! private TableSchema _secondForeignTable = null; ! private ColumnSchema _secondForeignColumn = null; ! private TableSchema _thirdForeignTable = null; ! private ColumnSchema _thirdForeignColumn = null; private AssociationType _association = AssociationType.OneToMany; + public ForeignKeyAssociation(){} + + public ForeignKeyAssociation(TableSchema table, ColumnSchema columnSchema, TableSchema foreignTable, ColumnSchema foreignColumn) + { + this._table = table; + this._columnSchema = columnSchema; + this._foreignColumn = foreignColumn; + this._foreignTable = foreignTable; + } + + public ForeignKeyAssociation(TableSchema table, ColumnSchema columnSchema, TableSchema foreignTable, ColumnSchema foreignColumn, TableSchema secondForeignTable, ColumnSchema secondForeignColumn) + { + this._table = table; + this._columnSchema = columnSchema; + this._foreignColumn = foreignColumn; + this._foreignTable = foreignTable; + this._secondForeignColumn = secondForeignColumn; + this._secondForeignTable = secondForeignTable; + } + + public ForeignKeyAssociation(TableSchema table, ColumnSchema columnSchema, TableSchema foreignTable, ColumnSchema foreignColumn, TableSchema secondForeignTable, ColumnSchema secondForeignColumn, TableSchema thirdForeignTable, ColumnSchema thirdForeignColumn) + { + this._table = table; + this._columnSchema = columnSchema; + this._foreignColumn = foreignColumn; + this._foreignTable = foreignTable; + this._secondForeignColumn = secondForeignColumn; + this._secondForeignTable = secondForeignTable; + this._thirdForeignColumn = thirdForeignColumn; + this._thirdForeignTable = thirdForeignTable; + } + [Browsable(false)] public ColumnSchema ForeignColumn *************** *** 26,30 **** public string ForeignColumnName { ! get{return this._foreignColumn.Name;} } --- 64,88 ---- public string ForeignColumnName { ! get ! { ! if(this._foreignColumn != null) return this._foreignColumn.Name; ! else return String.Empty; ! } ! } ! ! [Browsable(false)] ! public ColumnSchema SecondForeignColumn ! { ! get { return _secondForeignColumn; } ! set { _secondForeignColumn = value; } ! } ! ! public string SecondForeignColumnName ! { ! get ! { ! if(this._secondForeignColumn != null) return this._secondForeignColumn.Name; ! else return String.Empty; ! } } *************** *** 38,42 **** public string ColumnName { ! get{return this._columnSchema.Name;} } --- 96,120 ---- public string ColumnName { ! get ! { ! if(this._columnSchema != null) return this._columnSchema.Name; ! else return String.Empty; ! } ! } ! ! [Browsable(false)] ! public TableSchema Table ! { ! get { return this._table; } ! set { _table = value; } ! } ! ! public string TableName ! { ! get ! { ! if(this._table != null) return this._table.Name; ! else return String.Empty; ! } } *************** *** 50,59 **** public string ForeignTableName { ! get{return this._foreignTable.Name;} } public string ForeignKeyName { ! get{return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName;} } --- 128,197 ---- public string ForeignTableName { ! get ! { ! if(this._foreignTable != null) return this._foreignTable.Name; ! else return String.Empty; ! } ! } ! ! [Browsable(false)] ! public TableSchema SecondForeignTable ! { ! get { return _secondForeignTable; } ! set { _secondForeignTable = value; } ! } ! ! public string SecondForeignTableName ! { ! get ! { ! if(this._secondForeignTable != null) return this._secondForeignTable.Name; ! else return String.Empty; ! } ! } ! ! [Browsable(false)] ! public TableSchema ThirdForeignTable ! { ! get { return _thirdForeignTable; } ! set { _thirdForeignTable = value; } ! } ! ! public string ThirdForeignTableName ! { ! get ! { ! if(this._thirdForeignTable != null) return this._thirdForeignTable.Name; ! else return String.Empty; ! } ! } ! ! [Browsable(false)] ! public ColumnSchema ThirdForeignColumn ! { ! get { return _thirdForeignColumn; } ! set { _thirdForeignColumn = value; } ! } ! ! public string ThirdForeignColumnName ! { ! get ! { ! if(this._thirdForeignColumn != null) return this._thirdForeignColumn.Name; ! else return String.Empty; ! } } public string ForeignKeyName { ! get ! { ! if(this.SecondForeignTable != null && this.ThirdForeignTable != null) ! return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName + "-" + this.SecondForeignTableName + "." + this.SecondForeignColumnName + "-" + this.ThirdForeignTableName + "." + this.ThirdForeignColumnName; ! else if(this.SecondForeignTable != null && this.ThirdForeignTable == null) ! return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName + "-" + this.SecondForeignTableName + "." + this.SecondForeignColumnName; ! else ! return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName; ! } } *************** *** 64,75 **** } - public ForeignKeyAssociation(TableSchema table, ColumnSchema columnSchema, TableSchema foreignTable, ColumnSchema foreignColumn) - { - this._table = table; - this._columnSchema = columnSchema; - this._foreignColumn = foreignColumn; - this._foreignTable = foreignTable; - } - [Browsable(false)] public override string ToString() --- 202,205 ---- Index: LoadDatabaseSchema.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/LoadDatabaseSchema.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LoadDatabaseSchema.cs 16 Nov 2005 07:01:48 -0000 1.5 --- LoadDatabaseSchema.cs 9 Dec 2005 05:30:31 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- using System; + using Adapdev.Serialization; namespace Adapdev.Data.Schema *************** *** 25,37 **** public DatabaseSchema Load() { ! schemaFile = System.IO.Path.Combine(SchemaConstants.SCHEMAPATH,this._savedSchemaName); if(File.Exists(schemaFile)) { ! XmlSerializer dbSerializer = new XmlSerializer(typeof(DatabaseSchema)); ! FileStream dbStream = new FileStream(schemaFile, FileMode.Open); ! _dbSchema = (DatabaseSchema) dbSerializer.Deserialize(dbStream); ! dbStream.Close(); ! } return _dbSchema; } --- 26,44 ---- public DatabaseSchema Load() { ! schemaFile = Path.Combine(SchemaConstants.SCHEMAPATH,this._savedSchemaName); if(File.Exists(schemaFile)) { ! try ! { ! this._dbSchema = Serializer.DeserializeFromXmlFile(typeof(DatabaseSchema), schemaFile) as DatabaseSchema; ! } ! catch (Exception) ! { ! // Can't deserialize so let's get rid of it ! File.Delete(schemaFile); ! this._dbSchema = null; ! } ! } return _dbSchema; } Index: ColumnSchema.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/ColumnSchema.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ColumnSchema.cs 26 Nov 2005 08:09:22 -0000 1.13 --- ColumnSchema.cs 9 Dec 2005 05:30:31 -0000 1.14 *************** *** 236,241 **** /// </summary> /// <value></value> - [XmlIgnore] [Browsable(false)] public ArrayList ForeignKeyTables { --- 236,242 ---- /// </summary> /// <value></value> [Browsable(false)] + // [XmlElement(Type = typeof(ForeignKeyAssociation))] + [XmlIgnore] public ArrayList ForeignKeyTables { *************** *** 268,271 **** --- 269,273 ---- } + [XmlIgnore] public string DbDataType { |
From: Sean M. <int...@us...> - 2005-12-09 05:30:42
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6721/src/Adapdev.CodeGen Modified Files: NVelocityTableCodeTemplate.cs Log Message: Fixed bug w/ NVelocity generated update statement Added support for many-to-many associations in ForeignKeyAssociation Index: NVelocityTableCodeTemplate.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.CodeGen/NVelocityTableCodeTemplate.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NVelocityTableCodeTemplate.cs 16 Nov 2005 07:01:47 -0000 1.12 --- NVelocityTableCodeTemplate.cs 9 Dec 2005 05:30:30 -0000 1.13 *************** *** 196,200 **** foreach (ColumnSchema ci in ts.SortedColumns.Values) { ! if (!ci.IsAutoIncrement && ci.IsActive) query.Add(ci.Name); } --- 196,200 ---- foreach (ColumnSchema ci in ts.SortedColumns.Values) { ! if (!ci.IsAutoIncrement && !ci.IsPrimaryKey && ci.IsActive) query.Add(ci.Name); } |
From: Sean M. <int...@us...> - 2005-11-30 05:08:59
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3980/src/Adapdev.UnitTest.TestRunner.Tests Modified Files: AssemblyInfo.cs Log Message: Added reflection caching improvements for TestSuiteBuilder Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner.Tests/AssemblyInfo.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AssemblyInfo.cs 28 Nov 2005 23:40:24 -0000 1.4 --- AssemblyInfo.cs 30 Nov 2005 05:08:47 -0000 1.5 *************** *** 17,21 **** [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] ! //[assembly: CustomTestRunner(typeof(AdapdevTestRunner))] --- 17,21 ---- [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] ! [assembly: CustomTestRunner(typeof(AdapdevTestRunner))] |
From: Sean M. <int...@us...> - 2005-11-30 05:08:59
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3980/src/Adapdev.UnitTest.Core Modified Files: RunTestIterationCommand.cs TestSuiteBuilder.cs TypeHelper.cs Log Message: Added reflection caching improvements for TestSuiteBuilder Index: TestSuiteBuilder.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestSuiteBuilder.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TestSuiteBuilder.cs 26 Nov 2005 08:09:23 -0000 1.15 --- TestSuiteBuilder.cs 30 Nov 2005 05:08:47 -0000 1.16 *************** *** 1,2 **** --- 1,3 ---- + using System.Collections.Specialized; using System.Diagnostics; *************** *** 85,91 **** string orig = Environment.CurrentDirectory; Environment.CurrentDirectory = fi.DirectoryName; ! log.Debug("Building assembly: " + assemblyName); ! log.Debug("Environment Directory: " + orig); ! log.Debug("Assembly Directory: " + fi.DirectoryName); // add the assembly to the AssemblyCache --- 86,92 ---- 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 *************** *** 114,118 **** // restore the original environment Environment.CurrentDirectory = orig; ! if(log.IsDebugEnabled) log.Debug(ta.ToString()); } catch (Exception e) --- 115,119 ---- // restore the original environment Environment.CurrentDirectory = orig; ! //Console.WriteLine(ta.ToString()); } catch (Exception e) *************** *** 125,136 **** public TestFixture BuildTestFixture(Type t, TestAssembly ta, Assembly a) { Adapdev.UnitTest.Core.TestFixture tf = null; ! if (TypeHelper.HasCustomAttribute(t, typeof (Adapdev.UnitTest.TestFixtureAttribute)) ! || TypeHelper.HasCustomAttribute(t, typeof (NUnit.Framework.TestFixtureAttribute)) ! ) ! { try { ! if(log.IsDebugEnabled) log.Debug("Building TestFixture " + t.FullName); // Build the TestFixture tf = new Adapdev.UnitTest.Core.TestFixture(); --- 126,136 ---- public TestFixture BuildTestFixture(Type t, TestAssembly ta, Assembly a) { + HybridDictionary fd = TypeHelper.PopulateAttributes(t); Adapdev.UnitTest.Core.TestFixture tf = null; ! if(fd.Contains("Adapdev.UnitTest.TestFixtureAttribute") || fd.Contains("NUnit.Framework.TestFixtureAttribute")){ try { ! //Console.WriteLine("Building TestFixture " + t.FullName); ! // Build the TestFixture tf = new Adapdev.UnitTest.Core.TestFixture(); *************** *** 141,145 **** tf.FullName = t.FullName; ! if (TypeHelper.HasCustomAttribute(t, typeof (Adapdev.UnitTest.TestFixtureAttribute))) { Adapdev.UnitTest.TestFixtureAttribute tfa = (Adapdev.UnitTest.TestFixtureAttribute) TypeHelper.GetFirstCustomAttribute(t, typeof (Adapdev.UnitTest.TestFixtureAttribute)); --- 141,145 ---- tf.FullName = t.FullName; ! if (fd.Contains("Adapdev.UnitTest.TestFixtureAttribute")) { Adapdev.UnitTest.TestFixtureAttribute tfa = (Adapdev.UnitTest.TestFixtureAttribute) TypeHelper.GetFirstCustomAttribute(t, typeof (Adapdev.UnitTest.TestFixtureAttribute)); *************** *** 148,191 **** ! this.ProcessCommonAttributes(t, tf); foreach (MethodInfo mi in t.GetMethods()) { ! if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (NUnit.Framework.TestAttribute))) { ! if(log.IsDebugEnabled) log.Debug("Building Test " + mi.Name); tf.AddTest(this.BuildTest(mi, tf)); } ! else if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestFixtureSetUpAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (NUnit.Framework.TestFixtureSetUpAttribute))) { ! if(log.IsDebugEnabled) log.Debug("Building TestFixtureSetUp " + mi.Name); tf.AddFixtureSetUp(this.BuildBaseTestHelper(mi, tf)); } ! else if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestFixtureTearDownAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (NUnit.Framework.TestFixtureTearDownAttribute))) { ! if(log.IsDebugEnabled) log.Debug("Building TestFixtureTearDown " + mi.Name); tf.AddFixtureTearDown(this.BuildBaseTestHelper(mi, tf)); } ! else if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestSetUpAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.SetUpAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (NUnit.Framework.SetUpAttribute)) ) { ! if(log.IsDebugEnabled) log.Debug("Building TestSetUp " + mi.Name); ! tf.AddTestSetUp(this.BuildTestHelper(mi, tf)); } ! else if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestTearDownAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TearDownAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (NUnit.Framework.TearDownAttribute)) ) { ! if(log.IsDebugEnabled) log.Debug("Building TestTearDown " + mi.Name); ! tf.AddTestTearDown(this.BuildTestHelper(mi, tf)); } } ! if(log.IsDebugEnabled) log.Debug(tf.ToString()); } catch(Exception ex) --- 148,192 ---- ! this.ProcessCommonAttributes(fd, t, tf); foreach (MethodInfo mi in t.GetMethods()) { ! HybridDictionary md = TypeHelper.PopulateAttributes(mi); ! if (md.Contains("Adapdev.UnitTest.TestAttribute") ! || md.Contains("NUnit.Framework.TestAttribute")) { ! //Console.WriteLine("Building Test " + mi.Name); tf.AddTest(this.BuildTest(mi, tf)); } ! else if (md.Contains("Adapdev.UnitTest.TestFixtureSetUpAttribute") ! || md.Contains("NUnit.Framework.TestFixtureSetUpAttribute")) { ! //Console.WriteLine("Building TestFixtureSetUp " + mi.Name); tf.AddFixtureSetUp(this.BuildBaseTestHelper(mi, tf)); } ! else if (md.Contains("Adapdev.UnitTest.TestFixtureTearDownAttribute") ! || md.Contains("NUnit.Framework.TestFixtureTearDownAttribute")) { ! //Console.WriteLine("Building TestFixtureTearDown " + mi.Name); tf.AddFixtureTearDown(this.BuildBaseTestHelper(mi, tf)); } ! else if (md.Contains("Adapdev.UnitTest.TestSetUpAttribute") ! || md.Contains("Adapdev.UnitTest.SetUpAttribute") ! || md.Contains("NUnit.Framework.SetUpAttribute") ) { ! //Console.WriteLine("Building TestSetUp " + mi.Name); ! tf.AddTestSetUp(this.BuildTestHelper(md, mi, tf)); } ! else if (md.Contains("Adapdev.UnitTest.TestTearDownAttribute") ! || md.Contains("Adapdev.UnitTest.TearDownAttribute") ! || md.Contains("NUnit.Framework.TearDownAttribute") ) { ! //Console.WriteLine("Building TestTearDown " + mi.Name); ! tf.AddTestTearDown(this.BuildTestHelper(md, mi, tf)); } } ! //Console.WriteLine(tf.ToString()); } catch(Exception ex) *************** *** 205,217 **** t.Name = m.Name; t.FullName = tf.FullName + "." + m.Name; - this.ProcessTestAttribute(m, t); - this.ProcessCommonAttributes(m, t); - this.ProcessExpectedExceptionAttribute(m, t); - this.ProcessCategoryAttribute(m, t); - this.ProcessMaxKAttribute(m, t); - this.ProcessMinOperationsPerSecondAttribute(m, t); - this.ProcessTransactionAttribute(m, t); ! if(log.IsDebugEnabled) log.Debug("Test built: " + t.ToString()); return t; } --- 206,220 ---- t.Name = m.Name; t.FullName = tf.FullName + "." + m.Name; ! HybridDictionary md = TypeHelper.PopulateAttributes(m); ! this.ProcessTestAttribute(md, m, t); ! this.ProcessCommonAttributes(md, m, t); ! this.ProcessExpectedExceptionAttribute(md, m, t); ! this.ProcessCategoryAttribute(md, m, t); ! this.ProcessMaxKAttribute(md, m, t); ! this.ProcessMinOperationsPerSecondAttribute(md, m, t); ! this.ProcessTransactionAttribute(md, m, t); ! ! //Console.WriteLine("Test built: " + t.ToString()); return t; } *************** *** 225,247 **** } ! public TestHelper BuildTestHelper(MethodInfo m, TestFixture tf) { TestHelper th = new TestHelper(); th.Method = m.Name; th.Name = m.Name; ! this.ProcessTestSetUpAttribute(m, th); ! this.ProcessTestTearDownAttribute(m, th); return th; } ! public void ProcessCommonAttributes(ICustomAttributeProvider m, AbstractTest t) { ! this.ProcessIgnoreAttribute(m, t); ! this.ProcessRepeatAttribute(m, t); } ! public void ProcessIgnoreAttribute(ICustomAttributeProvider m, AbstractTest t) { ! if (TypeHelper.HasCustomAttribute(m, typeof (Adapdev.UnitTest.IgnoreAttribute))) { Adapdev.UnitTest.IgnoreAttribute ia = (Adapdev.UnitTest.IgnoreAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (Adapdev.UnitTest.IgnoreAttribute)); --- 228,250 ---- } ! public TestHelper BuildTestHelper(HybridDictionary md, MethodInfo m, TestFixture tf) { TestHelper th = new TestHelper(); th.Method = m.Name; th.Name = m.Name; ! this.ProcessTestSetUpAttribute(md, m, th); ! this.ProcessTestTearDownAttribute(md, m, th); return th; } ! public void ProcessCommonAttributes(HybridDictionary md, ICustomAttributeProvider m, AbstractTest t) { ! this.ProcessIgnoreAttribute(md, m, t); ! this.ProcessRepeatAttribute(md, m, t); } ! public void ProcessIgnoreAttribute(HybridDictionary md, ICustomAttributeProvider m, AbstractTest t) { ! if (md.Contains("Adapdev.UnitTest.IgnoreAttribute")) { Adapdev.UnitTest.IgnoreAttribute ia = (Adapdev.UnitTest.IgnoreAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (Adapdev.UnitTest.IgnoreAttribute)); *************** *** 249,253 **** t.IgnoreReason = ia.Reason; } ! else if (TypeHelper.HasCustomAttribute(m, typeof (NUnit.Framework.IgnoreAttribute))) { NUnit.Framework.IgnoreAttribute ia = (NUnit.Framework.IgnoreAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (NUnit.Framework.IgnoreAttribute)); --- 252,256 ---- t.IgnoreReason = ia.Reason; } ! else if (md.Contains("NUnit.Framework.IgnoreAttribute")) { NUnit.Framework.IgnoreAttribute ia = (NUnit.Framework.IgnoreAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (NUnit.Framework.IgnoreAttribute)); *************** *** 255,259 **** t.IgnoreReason = ia.Reason; } ! else if (TypeHelper.HasCustomAttribute(m, typeof(NUnit.Framework.ExplicitAttribute))) { t.Ignore = true; --- 258,262 ---- t.IgnoreReason = ia.Reason; } ! else if (md.Contains("NUnit.Framework.ExplicitAttribute")) { t.Ignore = true; *************** *** 262,268 **** } ! public void ProcessRepeatAttribute(ICustomAttributeProvider m, AbstractTest t) { ! if (TypeHelper.HasCustomAttribute(m, typeof (Adapdev.UnitTest.RepeatAttribute))) { Adapdev.UnitTest.RepeatAttribute a = (Adapdev.UnitTest.RepeatAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (Adapdev.UnitTest.RepeatAttribute)); --- 265,271 ---- } ! public void ProcessRepeatAttribute(HybridDictionary md, ICustomAttributeProvider m, AbstractTest t) { ! if (md.Contains("Adapdev.UnitTest.RepeatAttribute")) { Adapdev.UnitTest.RepeatAttribute a = (Adapdev.UnitTest.RepeatAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (Adapdev.UnitTest.RepeatAttribute)); *************** *** 274,280 **** } ! public void ProcessMaxKAttribute(ICustomAttributeProvider m, AbstractTest t) { ! if (TypeHelper.HasCustomAttribute(m, typeof (MaxKMemoryAttribute))) { MaxKMemoryAttribute a = (MaxKMemoryAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (MaxKMemoryAttribute)); --- 277,283 ---- } ! public void ProcessMaxKAttribute(HybridDictionary md, ICustomAttributeProvider m, AbstractTest t) { ! if (md.Contains("Adapdev.UnitTest.MaxKMemoryAttribute")) { MaxKMemoryAttribute a = (MaxKMemoryAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (MaxKMemoryAttribute)); *************** *** 284,290 **** } ! public void ProcessMinOperationsPerSecondAttribute(ICustomAttributeProvider m, AbstractTest t) { ! if (TypeHelper.HasCustomAttribute(m, typeof (MinOperationsPerSecondAttribute))) { MinOperationsPerSecondAttribute a = (MinOperationsPerSecondAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (MinOperationsPerSecondAttribute)); --- 287,293 ---- } ! public void ProcessMinOperationsPerSecondAttribute(HybridDictionary md, ICustomAttributeProvider m, AbstractTest t) { ! if (md.Contains("Adapdev.UnitTest.MinOperationsPerSecondAttribute")) { MinOperationsPerSecondAttribute a = (MinOperationsPerSecondAttribute) TypeHelper.GetFirstCustomAttribute(m, typeof (MinOperationsPerSecondAttribute)); *************** *** 294,300 **** } ! public void ProcessExpectedExceptionAttribute(ICustomAttributeProvider m, Test t) { ! if (TypeHelper.HasCustomAttribute(m, typeof (Adapdev.UnitTest.ExpectedExceptionAttribute))) { Adapdev.UnitTest.ExpectedExceptionAttribute a = --- 297,303 ---- } ! public void ProcessExpectedExceptionAttribute(HybridDictionary md, ICustomAttributeProvider m, Test t) { ! if (md.Contains("Adapdev.UnitTest.ExpectedExceptionAttribute")) { Adapdev.UnitTest.ExpectedExceptionAttribute a = *************** *** 304,308 **** t.ExpectedExceptionMessage = a.Message; } ! else if (TypeHelper.HasCustomAttribute(m, typeof (NUnit.Framework.ExpectedExceptionAttribute))) { NUnit.Framework.ExpectedExceptionAttribute a = --- 307,311 ---- t.ExpectedExceptionMessage = a.Message; } ! else if (md.Contains("NUnit.Framework.ExpectedExceptionAttribute")) { NUnit.Framework.ExpectedExceptionAttribute a = *************** *** 315,321 **** } ! public void ProcessTestAttribute(ICustomAttributeProvider m, Test t) { ! if (TypeHelper.HasCustomAttribute(m, typeof (Adapdev.UnitTest.TestAttribute))) { Adapdev.UnitTest.TestAttribute a = --- 318,324 ---- } ! public void ProcessTestAttribute(HybridDictionary md, ICustomAttributeProvider m, Test t) { ! if (md.Contains("Adapdev.UnitTest.TestAttribute")) { Adapdev.UnitTest.TestAttribute a = *************** *** 326,330 **** t.TestType = a.TestType; } ! else if (TypeHelper.HasCustomAttribute(m, typeof (NUnit.Framework.TestAttribute))) { NUnit.Framework.TestAttribute a = --- 329,333 ---- t.TestType = a.TestType; } ! else if (md.Contains("NUnit.Framework.TestAttribute")) { NUnit.Framework.TestAttribute a = *************** *** 336,343 **** } ! public void ProcessCategoryAttribute(ICustomAttributeProvider m, Test t) { // Check for NUnit Category attribute ! if (TypeHelper.HasCustomAttribute(m, typeof(NUnit.Framework.CategoryAttribute))) { NUnit.Framework.CategoryAttribute a = (NUnit.Framework.CategoryAttribute)TypeHelper.GetFirstCustomAttribute(m, typeof(NUnit.Framework.CategoryAttribute)); --- 339,346 ---- } ! public void ProcessCategoryAttribute(HybridDictionary md, ICustomAttributeProvider m, Test t) { // Check for NUnit Category attribute ! if (md.Contains("NUnit.Framework.CategoryAttribute")) { NUnit.Framework.CategoryAttribute a = (NUnit.Framework.CategoryAttribute)TypeHelper.GetFirstCustomAttribute(m, typeof(NUnit.Framework.CategoryAttribute)); *************** *** 346,356 **** } ! public void ProcessTransactionAttribute(ICustomAttributeProvider m, Test t) { ! if (TypeHelper.HasCustomAttribute(m, typeof(Adapdev.UnitTest.TransactionAttribute))) { t.TransactionType = TransactionType.AutoCommit; } ! else if (TypeHelper.HasCustomAttribute(m, typeof(Adapdev.UnitTest.RollbackTransactionAttribute))) { t.TransactionType = TransactionType.AutoRollback; --- 349,359 ---- } ! public void ProcessTransactionAttribute(HybridDictionary md, ICustomAttributeProvider m, Test t) { ! if (md.Contains("Adapdev.UnitTest.TransactionAttribute")) { t.TransactionType = TransactionType.AutoCommit; } ! else if (md.Contains("Adapdev.UnitTest.RollbackTransactionAttribute")) { t.TransactionType = TransactionType.AutoRollback; *************** *** 358,365 **** } ! public void ProcessTestSetUpAttribute(ICustomAttributeProvider mi, TestHelper t) { ! if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestSetUpAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.SetUpAttribute)) ) { --- 361,368 ---- } ! public void ProcessTestSetUpAttribute(HybridDictionary md, ICustomAttributeProvider mi, TestHelper t) { ! if (md.Contains("Adapdev.UnitTest.TestSetUpAttribute") ! || md.Contains("Adapdev.UnitTest.SetUpAttribute") ) { *************** *** 372,379 **** } ! public void ProcessTestTearDownAttribute(ICustomAttributeProvider mi, TestHelper t) { ! if (TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TestTearDownAttribute)) ! || TypeHelper.HasCustomAttribute(mi, typeof (Adapdev.UnitTest.TearDownAttribute)) ) { --- 375,382 ---- } ! public void ProcessTestTearDownAttribute(HybridDictionary md, ICustomAttributeProvider mi, TestHelper t) { ! if (md.Contains("Adapdev.UnitTest.TestTearDownAttribute") ! || md.Contains("Adapdev.UnitTest.TearDownAttribute") ) { *************** *** 391,397 **** string lostAssemblyFilename = Path.Combine(Environment.CurrentDirectory, lostNamespace + ".dll"); ! log.Debug("Not found. Trying to resolve " + lostAssemblyFilename); Assembly a = Assembly.LoadFile(lostAssemblyFilename); ! if(a != null) log.Debug("Found. Loaded " + a.GetName().Name + " - " + a.GetName().Version + " - " + a.Location); return a; --- 394,400 ---- 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; *************** *** 401,405 **** { AssemblyName assemblyName = assembly.GetName(); ! log.Debug("Probing for: " + assemblyName); if (! dependencyList.Contains(assemblyName.FullName)) { --- 404,408 ---- { AssemblyName assemblyName = assembly.GetName(); ! //Console.WriteLine("Probing for: " + assemblyName); if (! dependencyList.Contains(assemblyName.FullName)) { *************** *** 415,419 **** public void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args) { ! log.Debug("Loading: " + args.LoadedAssembly.FullName); } } --- 418,422 ---- public void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args) { ! //Console.WriteLine("Loading: " + args.LoadedAssembly.FullName); } } Index: TypeHelper.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TypeHelper.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TypeHelper.cs 16 Nov 2005 07:01:53 -0000 1.3 --- TypeHelper.cs 30 Nov 2005 05:08:47 -0000 1.4 *************** *** 1,2 **** --- 1,6 ---- + using System.Collections; + using System.Collections.Specialized; + using System.Diagnostics; + #region Copyright / License Information *************** *** 43,46 **** --- 47,52 ---- public class TypeHelper { + private static Hashtable attributeList = new Hashtable(); + public static bool HasCustomAttribute(ICustomAttributeProvider t, Type customAttributeType) { *************** *** 65,68 **** --- 71,93 ---- return attrs[0]; } + + public static HybridDictionary PopulateAttributes(ICustomAttributeProvider mi) + { + if(mi == null) + { + throw new ArgumentNullException("mi"); + } + + object[] attributes = mi.GetCustomAttributes(true); + System.Collections.Specialized.HybridDictionary attributeList = new HybridDictionary(attributes.Length); + + foreach(Attribute a in attributes) + { + attributeList[a.GetType().FullName] = null; + //Console.WriteLine(a.GetType().FullName); + } + + return attributeList; + } } } \ No newline at end of file Index: RunTestIterationCommand.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/RunTestIterationCommand.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RunTestIterationCommand.cs 27 Nov 2005 06:32:43 -0000 1.7 --- RunTestIterationCommand.cs 30 Nov 2005 05:08:47 -0000 1.8 *************** *** 203,207 **** try { - // Console.WriteLine(t.Method); if (t.Test.Length < 1 || t.Test.ToLower().Equals(name.ToLower())) { --- 203,206 ---- |
From: Sean M. <int...@us...> - 2005-11-28 23:40:34
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/src/Adapdev.UnitTest.TestRunner Modified Files: Adapdev.UnitTest.TestRunner.csproj AdapdevTestRunner.cs Log Message: Updated TestDriven.NET integration Added TestDriven.NET FitTests Changed version number to 0.8.4 Index: AdapdevTestRunner.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner/AdapdevTestRunner.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AdapdevTestRunner.cs 16 Nov 2005 07:01:59 -0000 1.3 --- AdapdevTestRunner.cs 28 Nov 2005 23:40:24 -0000 1.4 *************** *** 2,7 **** --- 2,9 ---- using System.Text; using TestDriven.Framework; + using TDF = TestDriven.Framework; using System.Reflection; using Adapdev.UnitTest.Core; + using AUC = Adapdev.UnitTest.Core; using System.Diagnostics; *************** *** 10,14 **** public class AdapdevTestRunner : ITestRunner { ! public TestRunResult RunAssembly(ITestListener testListener, Assembly assembly) { ITestSuiteFilter filter = new NoFilter(); --- 12,16 ---- public class AdapdevTestRunner : ITestRunner { ! public TestRunState RunAssembly(ITestListener testListener, Assembly assembly) { ITestSuiteFilter filter = new NoFilter(); *************** *** 16,20 **** } ! public TestRunResult RunMember(ITestListener testListener, Assembly assembly, MemberInfo member) { if (member is Type) --- 18,22 ---- } ! public TestRunState RunMember(ITestListener testListener, Assembly assembly, MemberInfo member) { if (member is Type) *************** *** 30,38 **** else { ! return TestRunResult.NoTests; } } ! public TestRunResult RunNamespace(ITestListener testListener, Assembly assembly, string ns) { ITestSuiteFilter filter = new NamespaceFilter(ns); --- 32,40 ---- else { ! return TestRunState.NoTests; } } ! public TestRunState RunNamespace(ITestListener testListener, Assembly assembly, string ns) { ITestSuiteFilter filter = new NamespaceFilter(ns); *************** *** 40,44 **** } ! TestRunResult run(ITestListener testListener, Assembly assembly, ITestSuiteFilter filter) { string assemblyFile = new Uri(assembly.CodeBase).LocalPath; --- 42,46 ---- } ! TestRunState run(ITestListener testListener, Assembly assembly, ITestSuiteFilter filter) { string assemblyFile = new Uri(assembly.CodeBase).LocalPath; *************** *** 49,53 **** if (suite.GetTestCount() == 0) { ! return TestRunResult.NoTests; } --- 51,55 ---- if (suite.GetTestCount() == 0) { ! return TestRunState.NoTests; } *************** *** 58,62 **** // HACK: Not always Success. ! return TestRunResult.Success; } --- 60,64 ---- // HACK: Not always Success. ! return TestRunState.Success; } *************** *** 75,79 **** { TestEventDispatcher dispatcher = new TestEventDispatcher(); - dispatcher.TestCompleted += new TestCompletedEventHandler(dispatcher_TestCompleted); dispatcher.TestIterationCompleted += new TestIterationCompletedEventHandler(dispatcher_TestIterationCompleted); dispatcher.TestSuiteCompleted += new TestSuiteCompletedEventHandler(dispatcher_TestSuiteCompleted); --- 77,80 ---- *************** *** 81,114 **** } - void dispatcher_TestCompleted(object sender, TestResultEventArgs e) - { - } - private void dispatcher_TestIterationCompleted(object sender, TestIterationEventArgs e) { ! // HACK: Should this event fire if the test is ForcedIgnore? ! if (e.TestIteration.State != TestState.Ignore) { ! TestResultSummary summary = new TestResultSummary(); ! summary.TotalTests = this.testCount; ! summary.IsFailure = e.TestIteration.State == TestState.Fail; ! summary.IsSuccess = e.TestIteration.State == TestState.Pass; ! summary.IsExecuted = summary.IsFailure || summary.IsSuccess; ! // This is the correct code, but commented out ! // since the TextFormatter is currently in place ! // if(summary.IsFailure) ! // { ! // summary.StackTrace = e.TestIteration.FullStackTrace; ! // summary.Message = e.TestIteration.Result + ! // Environment.NewLine + ! // e.TestIteration.ConsoleOutput; ! // // ConsoleOutput is a hack since ! // // I don't see a property in TestResultSummary. ! // // Where should this go? ! // } ! summary.Name = e.TestIteration.Name; summary.TimeSpan = TimeSpan.FromSeconds(e.TestIteration.Duration); - summary.TestRunner = GetType().FullName; this.testListener.TestFinished(summary); } --- 82,125 ---- } private void dispatcher_TestIterationCompleted(object sender, TestIterationEventArgs e) { ! // HACK: Should this event fire if ShouldRun == false? ! if (e.TestIteration.State != AUC.TestState.Ignore) { ! string consoleError = e.TestIteration.ConsoleError; ! if(consoleError != null && consoleError.Length > 0) ! { ! // HACK: Console output is being redirected. ! Trace.Write(consoleError); ! } ! string consoleOutput = e.TestIteration.ConsoleOutput; ! if(consoleOutput != null && consoleOutput.Length > 0) ! { ! // HACK: Console output is being redirected. ! Trace.Write(consoleOutput); ! } ! ! TDF.TestResult summary = new TDF.TestResult(); ! summary.TotalTests = this.testCount; ! switch(e.TestIteration.State) ! { ! case AUC.TestState.Pass: ! summary.State = TDF.TestState.Passed; ! break; ! case AUC.TestState.Fail: ! summary.State = TDF.TestState.Failed; ! break; ! case AUC.TestState.Ignore: ! case AUC.TestState.Untested: ! case AUC.TestState.ForcedIgnore: ! default: ! summary.State = TDF.TestState.Ignored; ! break; ! } ! summary.StackTrace = e.TestIteration.FullStackTrace; ! summary.Message = e.TestIteration.Result; ! summary.Name = e.TestIteration.Name; // HACK: Should be full test name. summary.TimeSpan = TimeSpan.FromSeconds(e.TestIteration.Duration); this.testListener.TestFinished(summary); } *************** *** 118,122 **** private void dispatcher_TestSuiteCompleted(object sender, TestAssemblyResult[] tar) { ! Console.WriteLine(new Adapdev.UnitTest.Core.TextFormatter(tar).GetText()); } } --- 129,133 ---- private void dispatcher_TestSuiteCompleted(object sender, TestAssemblyResult[] tar) { ! //Console.WriteLine(new Adapdev.UnitTest.Core.TextFormatter(tar).GetText()); } } Index: Adapdev.UnitTest.TestRunner.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner/Adapdev.UnitTest.TestRunner.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Adapdev.UnitTest.TestRunner.csproj 16 Nov 2005 07:01:59 -0000 1.3 --- Adapdev.UnitTest.TestRunner.csproj 28 Nov 2005 23:40:24 -0000 1.4 *************** *** 10,14 **** ApplicationIcon = "" AssemblyKeyContainerName = "" ! AssemblyName = "Adapdev.TestRunner" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" --- 10,14 ---- ApplicationIcon = "" AssemblyKeyContainerName = "" ! AssemblyName = "Adapdev.UnitTest.TestRunner" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" *************** *** 19,23 **** PreBuildEvent = "" PostBuildEvent = "" ! RootNamespace = "Adapdev.TestRunner" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" --- 19,23 ---- PreBuildEvent = "" PostBuildEvent = "" ! RootNamespace = "Adapdev.UnitTest.TestRunner" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" |
From: Sean M. <int...@us...> - 2005-11-28 23:40:33
|
Update of /cvsroot/adapdev/Adapdev/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/lib Modified Files: TestDriven.Framework.dll Log Message: Updated TestDriven.NET integration Added TestDriven.NET FitTests Changed version number to 0.8.4 Index: TestDriven.Framework.dll =================================================================== RCS file: /cvsroot/adapdev/Adapdev/lib/TestDriven.Framework.dll,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsEi63DL and /tmp/cvsy7LVKd differ |
From: Sean M. <int...@us...> - 2005-11-28 23:40:33
|
Update of /cvsroot/adapdev/Adapdev/src/FullBuild In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/src/FullBuild Modified Files: FullBuild.csproj Log Message: Updated TestDriven.NET integration Added TestDriven.NET FitTests Changed version number to 0.8.4 Index: FullBuild.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/FullBuild/FullBuild.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FullBuild.csproj 16 Nov 2005 07:02:01 -0000 1.3 --- FullBuild.csproj 28 Nov 2005 23:40:24 -0000 1.4 *************** *** 77,81 **** <Reference Name = "System.XML" ! AssemblyName = "System.XML" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> --- 77,81 ---- <Reference Name = "System.XML" ! AssemblyName = "System.Xml" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> *************** *** 125,128 **** --- 125,133 ---- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> + <Reference + Name = "Adapdev.UnitTest.TestRunner" + Project = "{2D0C35AA-CC64-4513-947D-F67C035D2B71}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
From: Sean M. <int...@us...> - 2005-11-28 23:40:33
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/src/Adapdev.UnitTest.TestRunner.Tests Modified Files: Adapdev.UnitTest.TestRunner.Tests.csproj AssemblyInfo.cs Added Files: ZanebugFitTests.cs Log Message: Updated TestDriven.NET integration Added TestDriven.NET FitTests Changed version number to 0.8.4 --- NEW FILE: ZanebugFitTests.cs --- using Adapdev.UnitTest; /// <assembly> /// <reference>lib\Adapdev.UnitTest.dll</reference> /// </assembly> namespace TestDriven.FitTests.ZanebugFitTests { using System; using Adapdev.UnitTest; using System.Diagnostics; using System.Threading; /// <test pass="2" /> [TestFixture] public class PassTests { /// <test pass="1" /> [Test] public void Test1() { Trace.WriteLine("Hello, World!"); } /// <test pass="1" /> [Test(Description = "Basic test")] public void Test2() { } } /// <test fail="1" /> [TestFixture] public class FailTests { /// <test fail="1" /> [Test] public void Test1() { Assert.Fail("Boom!"); } } // NOTE: This is different to NUnit where ignore="2" /// <test ignore="1" /> [TestFixture] public class IgnoreTests { // FIX: This test ends up being executed as an ad-hoc test. // Are tests makred as [Ignore] reported by Zanebug? /// <test fail="1" /> [Test, Ignore("Ignore Me")] public void Test1() { Assert.Fail("Boom!"); } /// <test ignore="1" /> [Test] public void Test2() { Assert.Ignore("Ignore Me!"); } } /// <test pass="2" /> [TestFixture] public class TestFixtureSetUpTests { int count; [TestFixtureSetUp] public void TestFixtureSetUp() { this.count++; } [Test] public void Test1() { Assert.AreEqual(1, this.count); } [Test] public void Test2() { Assert.AreEqual(1, this.count); } } /// <test pass="1" fail="1" /> [TestFixture] public class TestSetUpTests { int count; // Runs once at the beginning of each Test iteration [TestSetUp] public void TestSetUp() { this.count++; } [Test] public void Test1() { Assert.AreEqual(1, this.count); } [Test] public void Test2() { Assert.AreEqual(1, this.count); } } /// <test pass="1" fail="1" /> [TestFixture] public class SetUpTests { int count; // Runs once at the beginning of each Test iteration [SetUp] public void SetUp() { this.count++; } [Test] public void Test1() { Assert.AreEqual(1, this.count); } [Test] public void Test2() { Assert.AreEqual(1, this.count); } } /// <test pass="2" /> [TestFixture] public class TestSetUpSpecifiedTests { bool isSetUp; [TestSetUp("SpecifiedTest")] public void TestSetUp() { this.isSetUp = true; } [TearDown] public void TearDown() { this.isSetUp = false; } [Test] public void SpecifiedTest() { Assert.IsTrue(this.isSetUp); } [Test] public void Test2() { Assert.IsFalse(this.isSetUp); } } // NOTE: Why doesn't this work? /* /// <test pass="1" fail="1" /> [TestFixture] public class MaxMemTests { byte[] bytes; [Test(Description = "A Test who's total memory consumption should not exceed 200K")] [MaxKMemory(200)] public void MaxKMemory1() { } [Test(Description = "A Test who's total memory consumption should not exceed 200K")] [MaxKMemory(200)] public void MaxKMemory2() { this.bytes = new byte[300 * 1024]; } } */ /// <test pass="1" fail="1" /> [TestFixture] public class MinOperationsPerSecondTests { [Test(Description = "A Test that should be able to run at least 10X per second.")] [MinOperationsPerSecond(10)] public void MinOperationsPerSecondFail() { Thread.Sleep(1000); } [Test(Description = "A Test that should be able to run at least 10X per second.")] [MinOperationsPerSecond(10)] public void MinOperationsPerSecondPass() { } } /// <test pass="4" fail="1" /> [TestFixture] public class RepeatTests { int count; [Test(Description = "A Test that is repeated 5X")] [Repeat(5)] public void Repeat() { this.count++; Assert.IsTrue(this.count < 5); } } /// <test pass="2" fail="1" /> [TestFixture] public class RepeatWithDelayTests { DateTime start; [TestFixtureSetUp] public void TestFixtureSetUp() { this.start = DateTime.Now; } [Test(Description = "A Test that is repeated 5X")] [Repeat(3, 1000)] public void Repeat() { Assert.IsTrue((DateTime.Now - this.start) < TimeSpan.FromMilliseconds(2500)); } } // NOTE: Why is this not true? /* /// <test pass="1" fail="1" /> [TestFixture] public class TestTearDownTests { int count; [TestTearDown] public void TestTearDown() { this.count++; Assert.AreEqual(1, this.count); } [Test] public void Test1() { } [Test] public void Test2() { } } */ // NOTE: Why is this not true? /* /// <test pass="1" fail="1" /> [TestFixture] public class TearDownTests { int count; [TearDown] public void TearDown() { this.count++; Assert.AreEqual(1, this.count); } [Test] public void Test1() { } [Test] public void Test2() { } } */ // NOTE: Why doesn't this work? /* /// <test pass="1" fail="1" /> [TestFixture] public class TestTearDownSpecifiedTests { bool isSpecified; [TestTearDown("SpecifiedTest")] public void TestTearDown() { Assert.Fail("Fail on SpecifiedTest"); } [Test] public void SpecifiedTest() { this.isSpecified = true; } [Test] public void NotSpecifiedTest() { this.isSpecified = false; } } */ [TestFixture] public class ZanebugTest { // Runs only once, when the test assembly is dynamically loaded public ZanebugTest() { } // Runs once at the beginning of each TestFixture iteration [TestFixtureSetUp] public void TestFixtureSetUp() { Console.WriteLine("TestFixtureSetUp"); } // Runs once at the beginning of each Test iteration [TestSetUp] public void TestSetUp() { Console.WriteLine("TestSetUp"); } // Runs once at the beginning of each Test iteration [SetUp] public void SetUp() { Console.WriteLine("SetUp"); } // Runs once at the beginning of SimpleTest only [TestSetUp("SimpleTest")] public void SpecificTestSetUp() { Console.WriteLine("SpecificTestSetUp runs only for SimpleTest"); } // A Test [Test(Description = "Basic test")] public void SimpleTest() { Console.WriteLine("SimpleTest"); } // Runs once at the end of SimpleTest only [TestTearDown("SimpleTest")] public void SpecificTestTearDown() { Console.WriteLine("SpecificTestTearDown runs only for SimpleTest"); } // A Test with a Category [Test(Category = "Some Category", Description = "Demonstrates a Test that's assigned to a category")] public void TestWithCategory() { Console.WriteLine("Test with category"); } // A Test with a Description [Test(Description = "Demonstrates a Test that has a description")] public void TestWithDescription() { Console.WriteLine("Test with description"); } // A Test that is expecting a specific Exception // type to be thrown or any child class [Test(Description = "A Test that expects an Exception to be thrown.")] [ExpectedException(typeof(Exception))] public void ExpectedException() { Console.WriteLine("ExpectedException"); throw new Exception("This Exception is expected"); } // A Test that is expecting a specific Exception // type to be thrown with a specific message [Test(Description = "A Test that expects an Exception to be thrown with a specific message.")] [ExpectedException(typeof(Exception), "This Exception is expected")] public void ExpectedExceptionWithMessage() { Console.WriteLine("ExpectedException"); throw new Exception("This Exception is expected"); } // A Test that is expecting a specific Exception // type to be thrown with a specific message and fails [Test(Description = "A Test that expects an Exception to be thrown with a specific message and receives the wrong one.")] [ExpectedException(typeof(Exception), "This Exception is expected")] public void FailExpectedExceptionWithMessage() { Console.WriteLine("ExpectedException"); throw new Exception("This Exception is not expected"); } // A Test that is expecting a specific DivideByZeroException // type to be thrown or any child class [Test] [ExpectedException(typeof(Exception))] public void ExpectedDivideByZeroException() { Console.WriteLine("ExpectedException"); throw new DivideByZeroException("This Exception is expected."); } // A Test that will fail because the ExpectedException is not thrown [Test(Description = "A Test that expects an Exception to be thrown, but fails because one isn't.")] [ExpectedException(typeof(Exception))] public void FailExpectedException() { Console.WriteLine("ExpectedException"); } // A Test that will be ignored (not run) by default [Test(Description = "A Test that is ignored, with no reason provided.")] [Ignore] public void Ignore() { Console.WriteLine("Ignore"); } // A Test that will be ignored (not run) by default // and provides a reason [Test(Description = "A Test that is ignored, with a reason provided.")] [Ignore("Some reason")] public void IgnoreWithReason() { Console.WriteLine("Ignore with reason"); } // A Test that specifies the maximum amount of memory // that the Test can consume [Test(Description = "A Test who's total memory consumption should not exceed 200K")] [MaxKMemory(200)] public void MaxKMemory() { Console.WriteLine("MaxKMemory"); } [Test] public void AssertFail() { Assert.Fail("Boom!"); } // A Test that will fail if it can't be repeated // the min number of times in a second [Test(Description = "A Test that should be able to run at least 10X per second.")] [MinOperationsPerSecond(10)] public void MinOperationsPerSecond() { Console.WriteLine("MinOperationsPerSecond"); } // A Test that is repeated a set number of times [Test(Description = "A Test that is repeated 5X")] [Repeat(5)] public void Repeat() { Console.WriteLine("Repeat"); } // A Test that is repeated a set number of times // with a 3 second delay in between [Test(Description = "A Test that is repeated 5X, with a 3 second delay between each run.")] [Ignore] [Repeat(5, 3000)] public void RepeatWithDelay() { Console.WriteLine("Repeat with delay"); } // Runs once at the end of each Test iteration [TearDown] public void TearDown() { Console.WriteLine("TearDown"); } // Runs once at the end of each Test iteration [TestTearDown] public void TestTearDown() { Console.WriteLine("TestTearDown"); } // Runs once at the end of the TestFixture iteration [TestFixtureTearDown] public void TestFixtureTearDown() { Console.WriteLine("TestFixtureTearDown"); } } } Index: Adapdev.UnitTest.TestRunner.Tests.csproj =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner.Tests/Adapdev.UnitTest.TestRunner.Tests.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Adapdev.UnitTest.TestRunner.Tests.csproj 16 Nov 2005 07:01:59 -0000 1.3 --- Adapdev.UnitTest.TestRunner.Tests.csproj 28 Nov 2005 23:40:24 -0000 1.4 *************** *** 120,123 **** --- 120,128 ---- /> <File + RelPath = "ZanebugFitTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "ZanebugTest.cs" SubType = "Code" Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.TestRunner.Tests/AssemblyInfo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AssemblyInfo.cs 16 Nov 2005 07:01:59 -0000 1.3 --- AssemblyInfo.cs 28 Nov 2005 23:40:24 -0000 1.4 *************** *** 17,21 **** [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] ! [assembly: CustomTestRunner(typeof(AdapdevTestRunner))] --- 17,21 ---- [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] ! //[assembly: CustomTestRunner(typeof(AdapdevTestRunner))] |
From: Sean M. <int...@us...> - 2005-11-28 23:40:33
|
Update of /cvsroot/adapdev/Adapdev/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/src Modified Files: AdapdevAssemblyInfo.cs Log Message: Updated TestDriven.NET integration Added TestDriven.NET FitTests Changed version number to 0.8.4 Index: AdapdevAssemblyInfo.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/AdapdevAssemblyInfo.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AdapdevAssemblyInfo.cs 16 Nov 2005 07:02:01 -0000 1.11 --- AdapdevAssemblyInfo.cs 28 Nov 2005 23:40:24 -0000 1.12 *************** *** 27,31 **** // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.8.3")] // --- 27,31 ---- // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.8.4")] // |
From: Sean M. <int...@us...> - 2005-11-27 06:32:51
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27953/src/Adapdev.UnitTest.Core Modified Files: AbstractTest.cs RunTestCommand.cs RunTestFixtureCommand.cs RunTestIterationCommand.cs TestState.cs Log Message: Fixed bug w/ dataschema saving and comparison Fixed bugs w/ test multi-threading Index: AbstractTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/AbstractTest.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AbstractTest.cs 16 Nov 2005 07:01:53 -0000 1.6 --- AbstractTest.cs 27 Nov 2005 06:32:43 -0000 1.7 *************** *** 49,53 **** protected int _sequence = 0; protected int _id = 0; - protected bool _threads = false; protected bool _repeat = false; protected int _repeatCount = 1; --- 49,52 ---- *************** *** 74,83 **** } - public bool MultiThreaded - { - get { return this._threads; } - set { this._threads = value; } - } - public bool Repeat { --- 73,76 ---- Index: RunTestFixtureCommand.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/RunTestFixtureCommand.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RunTestFixtureCommand.cs 23 Nov 2005 03:00:42 -0000 1.5 --- RunTestFixtureCommand.cs 27 Nov 2005 06:32:43 -0000 1.6 *************** *** 25,28 **** --- 25,29 ---- { this._dispatcher = dispatcher; + //if(tf.IsMultiThreaded) this._dispatcher = null; this._testFixture = tf; this._assembly = assembly; *************** *** 33,59 **** public void Execute() { ! if(_dispatcher != null)_dispatcher.OnTestFixtureStarted(new TestFixtureEventArgs(this._testFixture)); ! for (int j = 1; j <= this._testFixture.RepeatCount; j++) { ! this._type = null; ! this._testFixtureIteration = null; ! if (this._testFixture.RepeatDelay > 0) Thread.Sleep(this._testFixture.RepeatDelay); ! this._testFixtureIteration = new TestFixtureIteration(); ! if(_dispatcher != null)this._dispatcher.OnTestFixtureIterationStarted(new TestFixtureEventArgs(this._testFixture)); ! this._o = this._assembly.CreateInstance(this._className); ! this._type = this._assembly.GetType(this._className, true); ! this.RunTestFixtureSetUps(this._testFixture, this._o, this._type); ! RunTests(); ! this.RunTestFixtureTearDowns(this._testFixture, this._o, this._type); ! this._testFixtureIteration.Iteration = j; ! this._testFixtureResult.AddIteration(this._testFixtureIteration); ! if(_dispatcher != null)_dispatcher.OnTestFixtureIterationCompleted(new TestFixtureIterationEventArgs(this._testFixtureIteration)); } - if(_dispatcher != null)_dispatcher.OnTestFixtureCompleted(new TestFixtureResultEventArgs(this._testFixtureResult)); } --- 34,63 ---- public void Execute() { ! if (!this._testFixture.Ignore && this._testFixture.ShouldRun) { ! if(_dispatcher != null && !_testFixture.IsMultiThreaded)_dispatcher.OnTestFixtureStarted(new TestFixtureEventArgs(this._testFixture)); ! for (int j = 1; j <= this._testFixture.RepeatCount; j++) ! { ! this._type = null; ! this._testFixtureIteration = null; ! if (this._testFixture.RepeatDelay > 0) Thread.Sleep(this._testFixture.RepeatDelay); ! this._testFixtureIteration = new TestFixtureIteration(); ! if(_dispatcher != null)this._dispatcher.OnTestFixtureIterationStarted(new TestFixtureEventArgs(this._testFixture)); ! this._o = this._assembly.CreateInstance(this._className); ! this._type = this._assembly.GetType(this._className, true); ! this.RunTestFixtureSetUps(this._testFixture, this._o, this._type); ! RunTests(); ! this.RunTestFixtureTearDowns(this._testFixture, this._o, this._type); ! this._testFixtureIteration.Iteration = j; ! this._testFixtureResult.AddIteration(this._testFixtureIteration); ! if(_dispatcher != null)_dispatcher.OnTestFixtureIterationCompleted(new TestFixtureIterationEventArgs(this._testFixtureIteration)); ! } ! if(_dispatcher != null)_dispatcher.OnTestFixtureCompleted(new TestFixtureResultEventArgs(this._testFixtureResult)); } } *************** *** 102,146 **** RunTestCommand command = new RunTestCommand(this._dispatcher, test, this._testFixture, this._type, this._o, this._testFixtureIteration); Thread t = new Thread(new ThreadStart(command.Execute)); threads.Add(t); t.Start(); } ! foreach(Thread t in threads) t.Join(); ! ! ! // using(ThreadPoolWait threadPool = new ThreadPoolWait()) ! // { ! // foreach (Test test in this._testFixture.GetTests()) ! // { ! // RunTestCommand command = new RunTestCommand(this._dispatcher, test, this._testFixture, this._type, this._o, this._testFixtureIteration); ! // threadPool.QueueUserWorkItem(new WaitCallback(command.Execute)); ! // } ! // threadPool.WaitOne(); ! // } - // SmartThreadPool smartThreadPool = new SmartThreadPool(); - // - // try - // { - // ArrayList workitems = new ArrayList(); - // - // foreach(Test test in this._testFixture.GetTests()) - // { - // RunTestCommand command = new RunTestCommand(this._dispatcher, test, this._testFixture, this._type, this._o, this._testFixtureIteration); - // workitems.Add(smartThreadPool.QueueWorkItem(new WorkItemCallback(command.Execute))); - // } - // - // workitems.TrimToSize(); - // IWorkItemResult[] results = workitems.ToArray(typeof(IWorkItemResult)) as IWorkItemResult[]; - // SmartThreadPool.WaitAll(results, 15000, true); - // } - // catch(Exception ex) - // { - // Console.WriteLine(ex.Message); - // Console.WriteLine(ex.StackTrace); - // } - // finally - // { - // smartThreadPool.Shutdown(); - // } } else --- 106,116 ---- RunTestCommand command = new RunTestCommand(this._dispatcher, test, this._testFixture, this._type, this._o, this._testFixtureIteration); Thread t = new Thread(new ThreadStart(command.Execute)); + t.IsBackground = true; + t.Priority = ThreadPriority.Highest; threads.Add(t); t.Start(); } ! foreach(Thread t in threads) t.Join(30000); } else Index: TestState.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/TestState.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestState.cs 16 Nov 2005 07:01:53 -0000 1.4 --- TestState.cs 27 Nov 2005 06:32:43 -0000 1.5 *************** *** 46,50 **** { Untested = 1, ! // NotRun = 2, Pass = 4, Ignore = 8, --- 46,50 ---- { Untested = 1, ! NotRun = 2, Pass = 4, Ignore = 8, Index: RunTestCommand.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/RunTestCommand.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RunTestCommand.cs 26 Nov 2005 08:09:23 -0000 1.6 --- RunTestCommand.cs 27 Nov 2005 06:32:43 -0000 1.7 *************** *** 30,38 **** private object o = null; private TestFixtureIteration _testFixtureIteration = null; - private readonly SmartThreadPool pool; public RunTestCommand(TestEventDispatcher dispatcher, Test test, TestFixture tf, Type type, object o, TestFixtureIteration tfi) { this._dispatcher = dispatcher; this._test = test; this._testFixture = tf; --- 30,38 ---- private object o = null; private TestFixtureIteration _testFixtureIteration = null; public RunTestCommand(TestEventDispatcher dispatcher, Test test, TestFixture tf, Type type, object o, TestFixtureIteration tfi) { this._dispatcher = dispatcher; + //if(test.IsMultiThreaded || tf.IsMultiThreaded) this._dispatcher = null; this._test = test; this._testFixture = tf; *************** *** 42,56 **** } - public RunTestCommand(TestEventDispatcher dispatcher, Test test, TestFixture tf, Type type, object o, TestFixtureIteration tfi, SmartThreadPool pool) - { - this._dispatcher = dispatcher; - this._test = test; - this._testFixture = tf; - this.o = o; - this._testFixtureIteration = tfi; - this.pool = pool; - this._type = type; - } - public void Execute() { --- 42,45 ---- *************** *** 94,98 **** private void RunTestIteration(TestResult testResult, MethodInfo method) { ! if(this._testFixture.IsMultiThreaded && this.pool != null) { ArrayList threads = new ArrayList(); --- 83,87 ---- private void RunTestIteration(TestResult testResult, MethodInfo method) { ! if(this._testFixture.IsMultiThreaded) { ArrayList threads = new ArrayList(); *************** *** 105,136 **** t.Start(); } ! foreach(Thread t in threads) t.Join(); ! ! // try ! // { ! // ArrayList workitems = new ArrayList(); ! // ! // for (int i = 1; i <= _test.RepeatCount; i++) ! // { ! // RunTestIterationCommand command = new RunTestIterationCommand(this._dispatcher, this._test, this._testFixture, this._type, this.o, this._testFixtureIteration, method, i, testResult); ! // workitems.Add(pool.QueueWorkItem(new WorkItemCallback(command.Execute))); ! // } ! // ! // workitems.TrimToSize(); ! // IWorkItemResult[] results = workitems.ToArray(typeof(IWorkItemResult)) as IWorkItemResult[]; ! // ! // SmartThreadPool.WaitAll(results, 15000, true); ! // } ! // catch(Exception ex) ! // { ! // Console.WriteLine(ex.Message); ! // Console.WriteLine(ex.StackTrace); ! // } ! } else { ! for (int i = 1; i <= _test.RepeatCount; i++) { ! new RunTestIterationCommand(this._dispatcher, this._test, this._testFixture, this._type, this.o, this._testFixtureIteration, method, i, testResult).Execute(); } } --- 94,107 ---- t.Start(); } ! foreach(Thread t in threads) t.Join(30000); ! } else { ! if(this._test.ShouldRun) { ! for (int i = 1; i <= _test.RepeatCount; i++) ! { ! new RunTestIterationCommand(this._dispatcher, this._test, this._testFixture, this._type, this.o, this._testFixtureIteration, method, i, testResult).Execute(); ! } } } Index: RunTestIterationCommand.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core/RunTestIterationCommand.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RunTestIterationCommand.cs 23 Nov 2005 03:00:42 -0000 1.6 --- RunTestIterationCommand.cs 27 Nov 2005 06:32:43 -0000 1.7 *************** *** 181,186 **** ti.TraceOutput = traceWriter.ToString(); ! lock(this){tr.AddIteration(ti);} ! if(_dispatcher != null)_dispatcher.OnTestIterationCompleted(new TestIterationEventArgs(ti)); Console.SetOut(consoleOut); --- 181,189 ---- ti.TraceOutput = traceWriter.ToString(); ! lock(this) ! { ! tr.AddIteration(ti); ! if(_dispatcher != null)_dispatcher.OnTestIterationCompleted(new TestIterationEventArgs(ti)); ! } Console.SetOut(consoleOut); |
From: Sean M. <int...@us...> - 2005-11-27 06:32:51
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27953/src/Adapdev.Data/Schema Modified Files: CompareDatabaseSchemas.cs SchemaConstants.cs TableSchema.cs Log Message: Fixed bug w/ dataschema saving and comparison Fixed bugs w/ test multi-threading Index: TableSchema.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/TableSchema.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TableSchema.cs 26 Nov 2005 08:09:22 -0000 1.12 --- TableSchema.cs 27 Nov 2005 06:32:43 -0000 1.13 *************** *** 265,269 **** [Browsable(false)] [XmlElement(Type = typeof(ColumnSchemaDictionary), ElementName = "Columns")] - [SchemaDataRewritableAttribute(true)] public ColumnSchemaDictionary Columns { --- 265,268 ---- Index: SchemaConstants.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/SchemaConstants.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SchemaConstants.cs 26 Nov 2005 09:08:59 -0000 1.7 --- SchemaConstants.cs 27 Nov 2005 06:32:43 -0000 1.8 *************** *** 9,13 **** { public static readonly string SCHEMAPATH = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData); ! public static readonly string REDUNDANT = "ZZZZ"; } } --- 9,13 ---- { public static readonly string SCHEMAPATH = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData); ! public static readonly string REDUNDANT = "REMOVED_"; } } Index: CompareDatabaseSchemas.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/CompareDatabaseSchemas.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CompareDatabaseSchemas.cs 26 Nov 2005 09:08:59 -0000 1.7 --- CompareDatabaseSchemas.cs 27 Nov 2005 06:32:43 -0000 1.8 *************** *** 128,132 **** TableSchema tableToUpdate = this._savedDatabaseSchema.GetTable(tableToUpdateFrom.Name); PropertyInfo tablePropertyToUpdate = tableToUpdate.GetType().GetProperty(property.Name); ! tablePropertyToUpdate.SetValue(this._savedDatabaseSchema.GetTable(tableToUpdateFrom.Name), property.GetValue(tableToUpdateFrom,null),null); } --- 128,132 ---- TableSchema tableToUpdate = this._savedDatabaseSchema.GetTable(tableToUpdateFrom.Name); PropertyInfo tablePropertyToUpdate = tableToUpdate.GetType().GetProperty(property.Name); ! tablePropertyToUpdate.SetValue(tableToUpdateFrom, property.GetValue(tableToUpdate,null),null); } *************** *** 141,145 **** ColumnSchema columnToUpdate = this._savedDatabaseSchema.GetTable(tableToUpdateFrom.Name).GetColumn(columnToUpdateFrom.Name); PropertyInfo columnPropertyToUpdate = columnToUpdate.GetType().GetProperty(property.Name); ! columnPropertyToUpdate.SetValue(columnToUpdate, property.GetValue(columnToUpdateFrom, null),null); } --- 141,145 ---- ColumnSchema columnToUpdate = this._savedDatabaseSchema.GetTable(tableToUpdateFrom.Name).GetColumn(columnToUpdateFrom.Name); PropertyInfo columnPropertyToUpdate = columnToUpdate.GetType().GetProperty(property.Name); ! columnPropertyToUpdate.SetValue(columnToUpdateFrom, property.GetValue(columnToUpdate, null),null); } |
From: Sean M. <int...@us...> - 2005-11-27 06:32:51
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27953/src/Adapdev.UnitTest.Core.Tests Modified Files: AdapdevLocalTestEngineTest.cs Log Message: Fixed bug w/ dataschema saving and comparison Fixed bugs w/ test multi-threading Index: AdapdevLocalTestEngineTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.Tests/AdapdevLocalTestEngineTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AdapdevLocalTestEngineTest.cs 23 Nov 2005 03:00:41 -0000 1.8 --- AdapdevLocalTestEngineTest.cs 27 Nov 2005 06:32:43 -0000 1.9 *************** *** 43,46 **** --- 43,147 ---- } } + + [Test] + public void RunAdapdevWithEvents() + { + 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 + @"\Adapdev.UnitTest.Core.AdapdevTests.dll")) + { + engine.SetTestEventDispatcher(disp); + + Assert.IsTrue(engine.GetLoadedAssemblies().Count > 0, "No assemblies loaded."); + TestAssembly assembly = engine.GetTestAssembly(); + Assert.IsTrue(assembly.GetTestCount() > 0, "No tests loaded."); + + TestAssemblyResult result = engine.Run(engine.GetTestAssembly()); + + Console.WriteLine(new Adapdev.UnitTest.Core.TextFormatter(new TestAssemblyResult[]{result}, true, true, true).GetText()); + + Assert.AreEqual(25, result.Passed); + Assert.AreEqual(2, result.Failed); + + } + } + + private void disp_TestAssemblyCompleted(object sender, TestAssemblyResultEventArgs e) + { + Console.WriteLine("disp_TestAssemblyCompleted"); + } + + private void disp_BaseTestHelperStarted(object sender, BaseTestHelperEventArgs e) + { + 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...> - 2005-11-27 06:32:51
|
Update of /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.AdapdevTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27953/src/Adapdev.UnitTest.Core.AdapdevTests Modified Files: MultiThreadedRepeatTest.cs Log Message: Fixed bug w/ dataschema saving and comparison Fixed bugs w/ test multi-threading Index: MultiThreadedRepeatTest.cs =================================================================== RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.UnitTest.Core.AdapdevTests/MultiThreadedRepeatTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MultiThreadedRepeatTest.cs 16 Nov 2005 07:01:53 -0000 1.3 --- MultiThreadedRepeatTest.cs 27 Nov 2005 06:32:43 -0000 1.4 *************** *** 27,31 **** Console.WriteLine("Thread {0}: {1}", AppDomain.GetCurrentThreadId(), i); } ! Assert.IsFalse(i==10, "i equals 10, which means it was not interrupted by other Threads."); } } --- 27,31 ---- Console.WriteLine("Thread {0}: {1}", AppDomain.GetCurrentThreadId(), i); } ! Assert.IsFalse(i==11, "i equals 10, which means it was not interrupted by other Threads."); } } |