From f7a97bfe31191b8357561c64c96f06623663b5a6 Mon Sep 17 00:00:00 2001 From: markpollack Date: Tue, 10 Nov 2009 03:04:07 +0000 Subject: [PATCH] SPRNET-1268 - Spring Exceptions should pass tests to ensure compliance with .NET framework guidelines. SPRNET-1267 - Add optimize compiler flag for release build --- Spring.include | 2 + .../Spring.Net.Messaging.Nms.2008.sln | 24 ++++ src/Spring/Spring.Aop/Spring.Aop.build | 1 + .../Spring.Core/Spring.Core.2005.csproj | 18 ++- src/Spring/Spring.Core/Spring.Core.build | 1 + .../Data/NHibernate/HibernateAdoException.cs | 15 ++ .../NHibernate/HibernateQueryException.cs | 24 ++++ .../NHibernate/HibernateSystemException.cs | 27 +++- .../Spring.Data.NHibernate.build | 1 + ...ernateOptimisticLockingFailureException.cs | 9 ++ .../Spring.Data.NHibernate12.build | 1 + ...ibernateObjectRetrievalFailureException.cs | 29 +++- ...ernateOptimisticLockingFailureException.cs | 26 ++++ .../Spring.Data.NHibernate20.build | 1 + .../Spring.Data.NHibernate21.build | 1 + .../Spring.Data.NHibernate30.build | 1 + src/Spring/Spring.Data/Spring.Data.build | 1 + .../Spring.Messaging.Ems.build | 5 +- .../Spring.Messaging.Nms.build | 5 +- .../Messaging/MessagingException.cs | 1 + .../Spring.Messaging/Spring.Messaging.build | 5 +- .../Spring.Scheduling.Quartz.build | 5 +- .../Spring.Services/Spring.Services.build | 1 + .../Spring.Template.Velocity.build | 3 +- .../Spring.Testing.Microsoft.build | 3 +- .../Spring.Testing.NUnit.build | 3 +- .../Spring.Web.Extensions.build | 1 + src/Spring/Spring.Web/Spring.Web.build | 1 + .../source/App.Core/App.Core.csproj | 6 +- .../AopCompilerOptionsTests.cs | 43 ++++++ .../Spring.Aop.Tests.2008.csproj | 1 + .../Spring.Aop.Tests/Spring.Aop.Tests.build | 1 + .../Spring.Core.Tests/CompilerOptionsTests.cs | 134 ++++++++++++++++++ .../CoreCompilerOptionsTests.cs | 43 ++++++ .../Spring.Core.Tests.2008.csproj | 4 +- .../Spring.Core.Tests/Spring.Core.Tests.build | 1 + .../Spring.Data.Integration.Tests.build | 1 + ...ng.Data.NHibernate.Integration.Tests.build | 1 + .../HibernateTransactionManagerTests.cs | 2 +- .../Spring.Data.NHibernate.Tests.build | 1 + ....Data.NHibernate20.Integration.Tests.build | 1 + .../HibernateCompilerOptionsTests.cs | 43 ++++++ .../HibernateExceptionTests.cs | 45 ++++++ ...Spring.Data.NHibernate20.Tests.2008.csproj | 8 +- .../Spring.Data.NHibernate20.Tests.build | 3 +- ....Data.NHibernate21.Integration.Tests.build | 1 + .../HibernateCompilerOptionsTests.cs | 43 ++++++ .../HibernateExceptionTests.cs | 45 ++++++ ...Spring.Data.NHibernate21.Tests.2008.csproj | 8 +- .../Spring.Data.NHibernate21.Tests.build | 1 + ....Data.NHibernate30.Integration.Tests.build | 1 + .../Spring.Data.NHibernate30.Tests.build | 1 + .../DataCompilerOptionsTests.cs | 43 ++++++ .../Spring.Data.Tests.2008.csproj | 1 + .../Spring.Data.Tests/Spring.Data.Tests.build | 1 + .../Spring.Messaging.Ems.Tests.build | 1 + .../Nms/Core/MessageTemplateTests.cs | 74 ++++++++++ .../NmsCompilerOptionsTests.cs | 43 ++++++ .../Spring.Messaging.Nms.Tests.2008.csproj | 1 + .../Spring.Messaging.Nms.Tests.build | 1 + .../MessageAlreadyProcessedException.cs | 1 + .../MessagingCompilerOptionsTests.cs | 44 ++++++ .../MessagingExceptionTests.cs | 46 ++++++ .../Spring.Messaging.Tests.2008.csproj | 2 + .../Spring.Messaging.Tests.build | 1 + ....Scheduling.Quartz.Integration.Tests.build | 1 + .../QuartzCompilerOptionsTests.cs | 43 ++++++ ...Spring.Scheduling.Quartz.Tests.2008.csproj | 1 + .../Spring.Scheduling.Quartz.Tests.build | 1 + .../ServicesCompilerOptionsTests.cs | 43 ++++++ .../Spring.Services.Tests.2008.csproj | 1 + .../Spring.Services.Tests.build | 1 + ...Spring.Services.WindowsService.Tests.build | 1 + .../Spring.Template.Velocity.Tests.build | 1 + .../Spring.Template.Velocity.Tests.csproj | 1 + .../VelocityCompilerOptionsTests.cs | 43 ++++++ .../Spring.Testing.Microsoft.Tests.build | 1 + .../NUnitCompilerOptionsTests.cs | 43 ++++++ .../Spring.Testing.NUnit.Tests.2008.csproj | 1 + .../Spring.Testing.NUnit.Tests.build | 1 + .../Spring.Web.Tests.2008.csproj | 1 + .../Spring.Web.Tests/Spring.Web.Tests.build | 8 +- .../WebCompilerOptionsTests.cs | 43 ++++++ 83 files changed, 1115 insertions(+), 32 deletions(-) create mode 100644 test/Spring/Spring.Aop.Tests/AopCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Core.Tests/CompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Core.Tests/CoreCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Data.NHibernate20.Tests/HibernateCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Data.NHibernate20.Tests/HibernateExceptionTests.cs create mode 100644 test/Spring/Spring.Data.NHibernate21.Tests/HibernateCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Data.NHibernate21.Tests/HibernateExceptionTests.cs create mode 100644 test/Spring/Spring.Data.Tests/DataCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Messaging.Nms.Tests/NmsCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Messaging.Tests/MessagingCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Messaging.Tests/MessagingExceptionTests.cs create mode 100644 test/Spring/Spring.Scheduling.Quartz.Tests/QuartzCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Services.Tests/ServicesCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Testing.NUnit.Tests/NUnitCompilerOptionsTests.cs create mode 100644 test/Spring/Spring.Web.Tests/WebCompilerOptionsTests.cs diff --git a/Spring.include b/Spring.include index bd6a51aa..af52e358 100644 --- a/Spring.include +++ b/Spring.include @@ -296,6 +296,7 @@ + @@ -309,6 +310,7 @@ + diff --git a/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln b/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln index 274a5638..a16a4634 100644 --- a/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln +++ b/build-support/solutions/Spring.Net.Messaging.Nms.2008.sln @@ -25,6 +25,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.Tests.2008", ". EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.2008", "..\..\src\Spring\Spring.Template.Velocity\Spring.Template.Velocity.2008.csproj", "{BF3AB954-8375-407C-9E98-4C51D8072784}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.2008", "..\..\src\Spring\Spring.Messaging.Nms\Spring.Messaging.Nms.2008.csproj", "{AEB1578C-9018-4D49-B440-789F38DD2F29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Nms.Tests.2008", "..\..\test\Spring\Spring.Messaging.Nms.Tests\Spring.Messaging.Nms.Tests.2008.csproj", "{FA7A6931-7DBE-4A32-A312-51FAD2E80332}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -155,6 +159,26 @@ Global {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Any CPU.Build.0 = Release|Any CPU {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {BF3AB954-8375-407C-9E98-4C51D8072784}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|.NET.ActiveCfg = Debug|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Release|.NET.ActiveCfg = Release|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Release|Any CPU.Build.0 = Release|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {AEB1578C-9018-4D49-B440-789F38DD2F29}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Debug|.NET.ActiveCfg = Debug|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|.NET.ActiveCfg = Release|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Any CPU.Build.0 = Release|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {FA7A6931-7DBE-4A32-A312-51FAD2E80332}.Release|Mixed Platforms.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Spring/Spring.Aop/Spring.Aop.build b/src/Spring/Spring.Aop/Spring.Aop.build index 9b372bce..12470d03 100644 --- a/src/Spring/Spring.Aop/Spring.Aop.build +++ b/src/Spring/Spring.Aop/Spring.Aop.build @@ -10,6 +10,7 @@ - - + Designer - - + Designer + + + Designer - - - + + Designer + + + Designer + Designer diff --git a/src/Spring/Spring.Core/Spring.Core.build b/src/Spring/Spring.Core/Spring.Core.build index e5e0b881..4fc3514c 100644 --- a/src/Spring/Spring.Core/Spring.Core.build +++ b/src/Spring/Spring.Core/Spring.Core.build @@ -11,6 +11,7 @@ public HibernateAdoException( string message, ADOException rootCause ) : base( message, rootCause ) {} + + /// + /// Creates a new instance of the HibernateSystemException class with the specified message + /// and root cause. + /// + /// + /// A message about the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public HibernateAdoException(string message, Exception rootCause) : base(message, rootCause) + { + } + /// /// Creates a new instance of the /// class. diff --git a/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateQueryException.cs b/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateQueryException.cs index 3b8d9065..7508749d 100644 --- a/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateQueryException.cs +++ b/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateQueryException.cs @@ -46,6 +46,15 @@ namespace Spring.Data.NHibernate { } + /// + /// Creates a new instance of the + /// class. + /// + /// + /// A message about the exception. + /// + public HibernateQueryException(string message) : base(message) { } + /// /// Initializes a new instance of the class. /// @@ -54,6 +63,21 @@ namespace Spring.Data.NHibernate { } + /// + /// Creates a new instance of the HibernateQueryException class with the specified message + /// and root cause. + /// + /// + /// A message about the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public HibernateQueryException(string message, Exception rootCause) + : base(message, rootCause) + { + } + /// /// Gets the query string that was invalid. /// diff --git a/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateSystemException.cs b/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateSystemException.cs index f22ae59a..3c05a2d4 100644 --- a/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateSystemException.cs +++ b/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateSystemException.cs @@ -42,11 +42,32 @@ namespace Spring.Data.NHibernate #region Constructor (s) /// /// Initializes a new instance of the class. - /// - public HibernateSystemException() + /// + public HibernateSystemException() { + } + + /// + /// Initializes a new instance of the class. + /// + /// The message. + public HibernateSystemException(string message): base(message) + { + } - } + /// + /// Creates a new instance of the HibernateSystemException class with the specified message + /// and root cause. + /// + /// + /// A message about the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public HibernateSystemException(string message, Exception rootCause) : base(message, rootCause) + { + } /// /// Initializes a new instance of the class. diff --git a/src/Spring/Spring.Data.NHibernate/Spring.Data.NHibernate.build b/src/Spring/Spring.Data.NHibernate/Spring.Data.NHibernate.build index 876ac7c5..d5a7258d 100644 --- a/src/Spring/Spring.Data.NHibernate/Spring.Data.NHibernate.build +++ b/src/Spring/Spring.Data.NHibernate/Spring.Data.NHibernate.build @@ -19,6 +19,7 @@ diff --git a/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/HibernateOptimisticLockingFailureException.cs b/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/HibernateOptimisticLockingFailureException.cs index 2478d50d..446f09f9 100644 --- a/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/HibernateOptimisticLockingFailureException.cs +++ b/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/HibernateOptimisticLockingFailureException.cs @@ -53,6 +53,15 @@ namespace Spring.Data.NHibernate { } + /// + /// Creates a new instance of the + /// class. + /// + /// + /// A message about the exception. + /// + public HibernateOptimisticLockingFailureException(string message) : base(message) { } + /// /// Initializes a new instance of the class. /// diff --git a/src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build b/src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build index abc68325..2e5f3056 100644 --- a/src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build +++ b/src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build @@ -19,6 +19,7 @@ diff --git a/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateObjectRetrievalFailureException.cs b/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateObjectRetrievalFailureException.cs index de8ba035..fe2c4ece 100644 --- a/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateObjectRetrievalFailureException.cs +++ b/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateObjectRetrievalFailureException.cs @@ -51,6 +51,15 @@ namespace Spring.Data.NHibernate { } + /// + /// Initializes a new instance of the class. + /// + /// The message. + public HibernateObjectRetrievalFailureException(string message) + : base(message) + { + } + /// /// Initializes a new instance of the class. @@ -84,9 +93,25 @@ namespace Spring.Data.NHibernate /// /// The ex. public HibernateObjectRetrievalFailureException(WrongClassException ex) : base(ex.EntityName, ex.Identifier, ex.Message, ex) - { - + { } + + /// + /// Creates a new instance of the HibernateObjectRetrievalFailureException class with the specified message + /// and root cause. + /// + /// + /// A message about the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public HibernateObjectRetrievalFailureException(string message, Exception rootCause) + : base(message, rootCause) + { + } + + /// /// Creates a new instance of the /// class. diff --git a/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateOptimisticLockingFailureException.cs b/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateOptimisticLockingFailureException.cs index 30c688ab..80b846c0 100644 --- a/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateOptimisticLockingFailureException.cs +++ b/src/Spring/Spring.Data.NHibernate20/Data/NHibernate/HibernateOptimisticLockingFailureException.cs @@ -54,6 +54,15 @@ namespace Spring.Data.NHibernate { } + /// + /// Creates a new instance of the + /// class. + /// + /// + /// A message about the exception. + /// + public HibernateOptimisticLockingFailureException(string message) : base(message) { } + /// /// Initializes a new instance of the class. /// @@ -70,6 +79,21 @@ namespace Spring.Data.NHibernate { } + /// + /// Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message + /// and root cause. + /// + /// + /// A message about the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public HibernateOptimisticLockingFailureException(string message, Exception rootCause) + : base(message, rootCause) + { + } + /// /// Creates a new instance of the /// class. @@ -86,6 +110,8 @@ namespace Spring.Data.NHibernate { } + + #endregion #region Properties diff --git a/src/Spring/Spring.Data.NHibernate20/Spring.Data.NHibernate20.build b/src/Spring/Spring.Data.NHibernate20/Spring.Data.NHibernate20.build index ad57bce8..27d5a7b6 100644 --- a/src/Spring/Spring.Data.NHibernate20/Spring.Data.NHibernate20.build +++ b/src/Spring/Spring.Data.NHibernate20/Spring.Data.NHibernate20.build @@ -19,6 +19,7 @@ diff --git a/src/Spring/Spring.Data.NHibernate21/Spring.Data.NHibernate21.build b/src/Spring/Spring.Data.NHibernate21/Spring.Data.NHibernate21.build index f98d4103..d432e39e 100644 --- a/src/Spring/Spring.Data.NHibernate21/Spring.Data.NHibernate21.build +++ b/src/Spring/Spring.Data.NHibernate21/Spring.Data.NHibernate21.build @@ -19,6 +19,7 @@ diff --git a/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build index 12398387..b5a2b791 100644 --- a/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build +++ b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build @@ -13,6 +13,7 @@ diff --git a/src/Spring/Spring.Data/Spring.Data.build b/src/Spring/Spring.Data/Spring.Data.build index 2ff7927f..d2b4442b 100644 --- a/src/Spring/Spring.Data/Spring.Data.build +++ b/src/Spring/Spring.Data/Spring.Data.build @@ -10,6 +10,7 @@ diff --git a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build index f39aac21..1c547ddf 100644 --- a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build +++ b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build @@ -8,7 +8,8 @@ --> - \ No newline at end of file + diff --git a/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.build b/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.build index 58c2e510..37bb659e 100644 --- a/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.build +++ b/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.build @@ -8,7 +8,8 @@ --> - \ No newline at end of file + diff --git a/src/Spring/Spring.Messaging/Messaging/MessagingException.cs b/src/Spring/Spring.Messaging/Messaging/MessagingException.cs index 409f11e9..74bfdbb5 100644 --- a/src/Spring/Spring.Messaging/Messaging/MessagingException.cs +++ b/src/Spring/Spring.Messaging/Messaging/MessagingException.cs @@ -7,6 +7,7 @@ namespace Spring.Messaging /// Base exception class for exceptions thrown by Spring in Spring.Messaging /// /// Mark Pollack + [Serializable] public class MessagingException : ApplicationException { #region Constructor (s) / Destructor diff --git a/src/Spring/Spring.Messaging/Spring.Messaging.build b/src/Spring/Spring.Messaging/Spring.Messaging.build index 899e8ceb..bf11063d 100644 --- a/src/Spring/Spring.Messaging/Spring.Messaging.build +++ b/src/Spring/Spring.Messaging/Spring.Messaging.build @@ -8,7 +8,8 @@ --> - \ No newline at end of file + diff --git a/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build b/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build index 6b569a3d..6217a888 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build +++ b/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build @@ -8,7 +8,8 @@ --> - \ No newline at end of file + diff --git a/src/Spring/Spring.Services/Spring.Services.build b/src/Spring/Spring.Services/Spring.Services.build index 478f0ede..e6ed2042 100644 --- a/src/Spring/Spring.Services/Spring.Services.build +++ b/src/Spring/Spring.Services/Spring.Services.build @@ -36,6 +36,7 @@ - \ No newline at end of file + diff --git a/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build b/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build index 55179c5a..52f02ed9 100644 --- a/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build +++ b/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build @@ -8,7 +8,8 @@ --> Debug AnyCPU - 9.0.21022 + 9.0.30729 2.0 {EDDC48D5-4F25-4476-9BA3-12F2E8BB5A8C} Library @@ -51,7 +51,9 @@ - + + False + diff --git a/test/Spring/Spring.Aop.Tests/AopCompilerOptionsTests.cs b/test/Spring/Spring.Aop.Tests/AopCompilerOptionsTests.cs new file mode 100644 index 00000000..f61796f2 --- /dev/null +++ b/test/Spring/Spring.Aop.Tests/AopCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Aop; + +#endregion + +namespace Spring +{ + /// Test that the AOP assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class AopCompilerOptionsTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (TruePointcut)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2008.csproj b/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2008.csproj index cbb37276..0128b264 100644 --- a/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2008.csproj +++ b/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2008.csproj @@ -267,6 +267,7 @@ Code + diff --git a/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.build b/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.build index 7fe6f0c7..5c86094c 100644 --- a/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.build +++ b/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Core.Tests/CompilerOptionsTests.cs b/test/Spring/Spring.Core.Tests/CompilerOptionsTests.cs new file mode 100644 index 00000000..f5170b2c --- /dev/null +++ b/test/Spring/Spring.Core.Tests/CompilerOptionsTests.cs @@ -0,0 +1,134 @@ +#region License + +/* + * Copyright © 2002-2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System; +using System.Diagnostics; +using System.Reflection; +using NUnit.Framework; + +#endregion + +namespace Spring +{ + /// + /// Tests the various exception classes. + /// + /// + /// + /// Shamelessly lifted from the NAnt test suite. + /// + /// + public abstract class CompilerOptionsTests + { + #region Tests + + [Test] + public void TestBuildCompliance() + { + ProcessAssembly(AssemblyToCheck); + } + + #endregion + + private void ProcessAssembly(Assembly assembly) + { + object[] attributes = assembly.GetCustomAttributes(typeof (DebuggableAttribute), false); + +#if DEBUG && TRACE + if (attributes.Length == 0) + { + Assert.Fail("No DebugAttributes found in debug build"); + } + ProcessDebugBuild(attributes); +#endif +#if TRACE && !DEBUG + if (attributes.Length == 0) + { + // This was build with VS.NET Release mode and no DebugAttributes were added. + } + else + { + // Command line build still adds some debug attributes... + ProcessReleaseBuild(attributes); + } +#endif + } + + private void ProcessReleaseBuild(object[] attributes) + { + foreach (Attribute attribute in attributes) + { + if (attribute is DebuggableAttribute) + { + DebuggableAttribute debuggableAttribute = attribute as DebuggableAttribute; + if (debuggableAttribute.IsJITOptimizerDisabled) + { + Assert.Fail("IsJITOptimizerDisabled should be set to false for Release builds."); + } + if (debuggableAttribute.IsJITTrackingEnabled) + { + Assert.Fail("IsJITTrackingEnabled should be set to false for Release builds."); + } + } + } + } + + + private void ProcessDebugBuild(object[] attributes) + { + foreach (Attribute attribute in attributes) + { + if (attribute is DebuggableAttribute) + { + DebuggableAttribute debuggableAttribute = attribute as DebuggableAttribute; + if (debuggableAttribute.IsJITOptimizerDisabled == false) + { + Assert.Fail("IsJITOptimizerDisabled should be set to true for Debug builds."); + } + if (debuggableAttribute.IsJITTrackingEnabled == false) + { + Assert.Fail("IsJITTrackingEnabled should be set to true for Debug builds."); + } + } + } + } + + + + #region Properties + + /// + /// Specify the assembly whose metadata will be checked for a given release mode (debug/release). + /// + protected Assembly AssemblyToCheck + { + get { return _assemblyToCheck; } + set { _assemblyToCheck = value; } + } + + #endregion + + private Assembly _assemblyToCheck = null; + + + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Core.Tests/CoreCompilerOptionsTests.cs b/test/Spring/Spring.Core.Tests/CoreCompilerOptionsTests.cs new file mode 100644 index 00000000..fa5d47cb --- /dev/null +++ b/test/Spring/Spring.Core.Tests/CoreCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Objects; + +#endregion + +namespace Spring +{ + /// Test that the AOP assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class CoreCompilerOptionsTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (ObjectsException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2008.csproj b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2008.csproj index 6639fcd1..b5d422bd 100644 --- a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2008.csproj +++ b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2008.csproj @@ -220,6 +220,7 @@ Code + Code @@ -274,9 +275,10 @@ - + Code + Code diff --git a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build index d5cd7737..218e9977 100644 --- a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build +++ b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build @@ -18,6 +18,7 @@ diff --git a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.build b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.build index 75161f66..392485f6 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.build +++ b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate.Integration.Tests.build b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate.Integration.Tests.build index 1b433b87..1f2145b2 100644 --- a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate.Integration.Tests.build +++ b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate.Integration.Tests.build @@ -11,6 +11,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/HibernateTransactionManagerTests.cs b/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/HibernateTransactionManagerTests.cs index c206042e..970464a2 100644 --- a/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/HibernateTransactionManagerTests.cs +++ b/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/HibernateTransactionManagerTests.cs @@ -554,7 +554,7 @@ namespace Spring.Data.NHibernate } else { -#if NH_2_0 +#if NH_2_0 || NH_2_1 rootCause = new PropertyValueException("mymsg", typeof(string).Name, "Name"); #else rootCause = new PropertyValueException("mymsg", typeof(string), "Name"); diff --git a/test/Spring/Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Tests.build b/test/Spring/Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Tests.build index 85f2c424..5bee118f 100644 --- a/test/Spring/Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Tests.build +++ b/test/Spring/Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Tests.build @@ -21,6 +21,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate20.Integration.Tests.build b/test/Spring/Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate20.Integration.Tests.build index 9900c00a..17944bd2 100644 --- a/test/Spring/Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate20.Integration.Tests.build +++ b/test/Spring/Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate20.Integration.Tests.build @@ -22,6 +22,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate20.Tests/HibernateCompilerOptionsTests.cs b/test/Spring/Spring.Data.NHibernate20.Tests/HibernateCompilerOptionsTests.cs new file mode 100644 index 00000000..8f061c8a --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate20.Tests/HibernateCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Data.NHibernate; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class HibernateCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate20.Tests/HibernateExceptionTests.cs b/test/Spring/Spring.Data.NHibernate20.Tests/HibernateExceptionTests.cs new file mode 100644 index 00000000..9cd2ec05 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate20.Tests/HibernateExceptionTests.cs @@ -0,0 +1,45 @@ +#region License + +/* + * Copyright 2004 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; + +using NUnit.Framework; +using Spring.Data.NHibernate; + +#endregion + +namespace Spring +{ + /// + /// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library... + /// + /// Rick Evans + [TestFixture] + public sealed class HibernateExceptionTests : ExceptionsTest + { + [TestFixtureSetUp] + public void FixtureSetUp () + { + AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException)); + } + } +} diff --git a/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.2008.csproj b/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.2008.csproj index 608a1029..ec07b794 100644 --- a/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.2008.csproj +++ b/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.2008.csproj @@ -23,7 +23,7 @@ pdbonly true ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Tests\Release\ - TRACE;NET_2_0 + TRACE;NET_2_0,NH_2_0 prompt 4 @@ -94,6 +94,8 @@ Data\NHibernate\TestObject.cs + + @@ -118,6 +120,10 @@ {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} Spring.Data.2008 + + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904} + Spring.Core.Tests.2008 + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0} Spring.Data.Tests.2008 diff --git a/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.build b/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.build index 3c8837f2..e45fabc9 100644 --- a/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.build +++ b/test/Spring/Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate20.Tests.build @@ -21,6 +21,7 @@ @@ -38,7 +39,7 @@ - + diff --git a/test/Spring/Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate21.Integration.Tests.build b/test/Spring/Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate21.Integration.Tests.build index 702a3b10..b2af9461 100644 --- a/test/Spring/Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate21.Integration.Tests.build +++ b/test/Spring/Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate21.Integration.Tests.build @@ -22,6 +22,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate21.Tests/HibernateCompilerOptionsTests.cs b/test/Spring/Spring.Data.NHibernate21.Tests/HibernateCompilerOptionsTests.cs new file mode 100644 index 00000000..8f061c8a --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate21.Tests/HibernateCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Data.NHibernate; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class HibernateCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate21.Tests/HibernateExceptionTests.cs b/test/Spring/Spring.Data.NHibernate21.Tests/HibernateExceptionTests.cs new file mode 100644 index 00000000..9cd2ec05 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate21.Tests/HibernateExceptionTests.cs @@ -0,0 +1,45 @@ +#region License + +/* + * Copyright 2004 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; + +using NUnit.Framework; +using Spring.Data.NHibernate; + +#endregion + +namespace Spring +{ + /// + /// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library... + /// + /// Rick Evans + [TestFixture] + public sealed class HibernateExceptionTests : ExceptionsTest + { + [TestFixtureSetUp] + public void FixtureSetUp () + { + AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException)); + } + } +} diff --git a/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.2008.csproj b/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.2008.csproj index 24b6618d..ed6d97cc 100644 --- a/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.2008.csproj +++ b/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.2008.csproj @@ -23,7 +23,7 @@ pdbonly true ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Tests\Release\ - TRACE;NET_2_0,NET_2_1 + TRACE;NET_2_0,NH_2_1 prompt 4 @@ -91,6 +91,8 @@ Data\NHibernate\TestObject.cs + + @@ -115,6 +117,10 @@ {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} Spring.Data.2008 + + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904} + Spring.Core.Tests.2008 + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0} Spring.Data.Tests.2008 diff --git a/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.build b/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.build index 1a28a5b4..66bcf64e 100644 --- a/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.build +++ b/test/Spring/Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate21.Tests.build @@ -21,6 +21,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build index e9b3f5a0..42b647a3 100644 --- a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build @@ -11,6 +11,7 @@ diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build index 7d9be6c7..a92e1d7a 100644 --- a/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build @@ -12,6 +12,7 @@ diff --git a/test/Spring/Spring.Data.Tests/DataCompilerOptionsTests.cs b/test/Spring/Spring.Data.Tests/DataCompilerOptionsTests.cs new file mode 100644 index 00000000..02bec0f1 --- /dev/null +++ b/test/Spring/Spring.Data.Tests/DataCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Transaction; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class DataCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (CannotCreateTransactionException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2008.csproj b/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2008.csproj index 9e27abe8..f322a9e3 100644 --- a/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2008.csproj +++ b/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2008.csproj @@ -171,6 +171,7 @@ + diff --git a/test/Spring/Spring.Data.Tests/Spring.Data.Tests.build b/test/Spring/Spring.Data.Tests/Spring.Data.Tests.build index e94e7591..b72cafb9 100644 --- a/test/Spring/Spring.Data.Tests/Spring.Data.Tests.build +++ b/test/Spring/Spring.Data.Tests/Spring.Data.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build b/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build index d358a5ed..3cf83a96 100644 --- a/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build +++ b/test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Core/MessageTemplateTests.cs b/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Core/MessageTemplateTests.cs index fde95d09..afe56d1b 100644 --- a/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Core/MessageTemplateTests.cs +++ b/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Core/MessageTemplateTests.cs @@ -101,6 +101,77 @@ namespace Spring.Messaging.Nms.Core LastCall.Return(queue).Repeat.Any(); } + [Test] + public void ProducerCallback() + { + NmsTemplate template = CreateTemplate(); + template.ConnectionFactory = mockConnectionFactory; + + IMessageProducer mockProducer = (IMessageProducer)mocks.CreateMock(typeof(IMessageProducer)); + Expect.Call(mockSession.CreateProducer(null)).Return(mockProducer); + + Expect.Call(mockProducer.Priority).Return(MsgPriority.Normal); + CloseProducerSessionConnection(mockProducer); + + mocks.ReplayAll(); + + MsgPriority priority = MsgPriority.Highest; + template.Execute(delegate(ISession session, IMessageProducer producer) + { + bool b = session.Transacted; + priority = producer.Priority; + return null; + + }); + + Assert.AreEqual(priority, MsgPriority.Normal); + mocks.VerifyAll(); + + } + + [Test] + public void ProducerCallbackWithIdAndTimestampDisabled() + { + NmsTemplate template = CreateTemplate(); + template.ConnectionFactory = mockConnectionFactory; + template.MessageIdEnabled = false; + template.MessageTimestampEnabled = false; + + IMessageProducer mockProducer = (IMessageProducer) mocks.CreateMock(typeof (IMessageProducer)); + Expect.Call(mockSession.CreateProducer(null)).Return(mockProducer); + + mockProducer.DisableMessageID = true; + LastCall.On(mockProducer).Repeat.Once(); + mockProducer.DisableMessageTimestamp = true; + LastCall.On(mockProducer).Repeat.Once(); + + Expect.Call(mockProducer.Priority).Return(MsgPriority.Normal); + CloseProducerSessionConnection(mockProducer); + + mocks.ReplayAll(); + + template.Execute(delegate(ISession session, IMessageProducer producer) + { + bool b = session.Transacted; + MsgPriority priority = producer.Priority; + return null; + + }); + + mocks.VerifyAll(); + + } + + private void CloseProducerSessionConnection(IMessageProducer mockProducer) + { + mockProducer.Close(); + LastCall.On(mockProducer).Repeat.Once(); + mockSession.Close(); + LastCall.On(mockSession).Repeat.Once(); + mockConnection.Close(); + LastCall.On(mockConnection).Repeat.Once(); + } + [Test] public void SessionCallback() { @@ -130,6 +201,7 @@ namespace Spring.Messaging.Nms.Core mockConnection.Start(); LastCall.On(mockConnection).Repeat.Times(2); + // We're gonna call getTransacted 3 times, i.e. 2 more times. Expect.Call(mockSession.Transacted).Return(UseTransactedSession).Repeat.Twice(); if (UseTransactedTemplate) @@ -194,5 +266,7 @@ namespace Spring.Messaging.Nms.Core Assert.IsTrue(TransactionSynchronizationManager.ResourceDictionary.Count == 0); mocks.VerifyAll(); } + + } } \ No newline at end of file diff --git a/test/Spring/Spring.Messaging.Nms.Tests/NmsCompilerOptionsTests.cs b/test/Spring/Spring.Messaging.Nms.Tests/NmsCompilerOptionsTests.cs new file mode 100644 index 00000000..52c98fef --- /dev/null +++ b/test/Spring/Spring.Messaging.Nms.Tests/NmsCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Messaging.Nms.Listener.Adapter; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class NmsCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (ListenerExecutionFailedException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj b/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj index f83639f1..2d23b48f 100644 --- a/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj +++ b/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.2008.csproj @@ -81,6 +81,7 @@ CommonAssemblyInfo.cs + diff --git a/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build b/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build index e0f59f24..3631482b 100644 --- a/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build +++ b/test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Messaging.Tests/Messaging/Support/MessageAlreadyProcessedException.cs b/test/Spring/Spring.Messaging.Tests/Messaging/Support/MessageAlreadyProcessedException.cs index f5653447..c7b1ef41 100644 --- a/test/Spring/Spring.Messaging.Tests/Messaging/Support/MessageAlreadyProcessedException.cs +++ b/test/Spring/Spring.Messaging.Tests/Messaging/Support/MessageAlreadyProcessedException.cs @@ -9,6 +9,7 @@ namespace Spring.Messaging /// message that has been processed by the database but not acknowledged to MSMQ /// due to an application failure. /// + [Serializable] public class MessageAlreadyProcessedException : MessagingException { #region Constructor (s) / Destructor diff --git a/test/Spring/Spring.Messaging.Tests/MessagingCompilerOptionsTests.cs b/test/Spring/Spring.Messaging.Tests/MessagingCompilerOptionsTests.cs new file mode 100644 index 00000000..64cfb81b --- /dev/null +++ b/test/Spring/Spring.Messaging.Tests/MessagingCompilerOptionsTests.cs @@ -0,0 +1,44 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Messaging; +using Spring.Transaction; + +#endregion + +namespace Spring +{ + /// Test that the Messaging assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class MessagingCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (MessagingException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Messaging.Tests/MessagingExceptionTests.cs b/test/Spring/Spring.Messaging.Tests/MessagingExceptionTests.cs new file mode 100644 index 00000000..306892f5 --- /dev/null +++ b/test/Spring/Spring.Messaging.Tests/MessagingExceptionTests.cs @@ -0,0 +1,46 @@ +#region License + +/* + * Copyright 2004 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System; +using System.Reflection; + +using NUnit.Framework; +using Spring.Messaging; + +#endregion + +namespace Spring +{ + /// + /// Unit tests for all of the exception classes in the Spring.Data library... + /// + /// Rick Evans + [TestFixture] + public sealed class MessagingExceptionTests : ExceptionsTest + { + [TestFixtureSetUp] + public void FixtureSetUp () + { + AssemblyToCheck = Assembly.GetAssembly(typeof(MessagingException)); + } + } +} diff --git a/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.2008.csproj b/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.2008.csproj index c1b378f3..7d51cc81 100644 --- a/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.2008.csproj +++ b/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.2008.csproj @@ -86,6 +86,8 @@ + + diff --git a/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build b/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build index 855b8781..f9298b48 100644 --- a/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build +++ b/test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Scheduling.Quartz.Integration.Tests/Spring.Scheduling.Quartz.Integration.Tests.build b/test/Spring/Spring.Scheduling.Quartz.Integration.Tests/Spring.Scheduling.Quartz.Integration.Tests.build index 76fc5d5a..0f035f69 100644 --- a/test/Spring/Spring.Scheduling.Quartz.Integration.Tests/Spring.Scheduling.Quartz.Integration.Tests.build +++ b/test/Spring/Spring.Scheduling.Quartz.Integration.Tests/Spring.Scheduling.Quartz.Integration.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Scheduling.Quartz.Tests/QuartzCompilerOptionsTests.cs b/test/Spring/Spring.Scheduling.Quartz.Tests/QuartzCompilerOptionsTests.cs new file mode 100644 index 00000000..fe07be82 --- /dev/null +++ b/test/Spring/Spring.Scheduling.Quartz.Tests/QuartzCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Scheduling.Quartz; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class QuartzCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (SchedulingException)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.2008.csproj b/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.2008.csproj index fe0e52b5..b23cdfc6 100644 --- a/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.2008.csproj +++ b/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.2008.csproj @@ -63,6 +63,7 @@ + diff --git a/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build b/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build index f3b46d4c..4b5e1fc0 100644 --- a/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build +++ b/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Services.Tests/ServicesCompilerOptionsTests.cs b/test/Spring/Spring.Services.Tests/ServicesCompilerOptionsTests.cs new file mode 100644 index 00000000..a89c945f --- /dev/null +++ b/test/Spring/Spring.Services.Tests/ServicesCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Remoting; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class ServicesCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (CaoExporter)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Services.Tests/Spring.Services.Tests.2008.csproj b/test/Spring/Spring.Services.Tests/Spring.Services.Tests.2008.csproj index 1e06b257..b3c6bc23 100644 --- a/test/Spring/Spring.Services.Tests/Spring.Services.Tests.2008.csproj +++ b/test/Spring/Spring.Services.Tests/Spring.Services.Tests.2008.csproj @@ -111,6 +111,7 @@ + Code diff --git a/test/Spring/Spring.Services.Tests/Spring.Services.Tests.build b/test/Spring/Spring.Services.Tests/Spring.Services.Tests.build index df16db0e..1d7e8f90 100644 --- a/test/Spring/Spring.Services.Tests/Spring.Services.Tests.build +++ b/test/Spring/Spring.Services.Tests/Spring.Services.Tests.build @@ -32,6 +32,7 @@ diff --git a/test/Spring/Spring.Services.Tests/Spring.Services.WindowsService.Tests.build b/test/Spring/Spring.Services.Tests/Spring.Services.WindowsService.Tests.build index 3e224dbc..179351be 100644 --- a/test/Spring/Spring.Services.Tests/Spring.Services.WindowsService.Tests.build +++ b/test/Spring/Spring.Services.Tests/Spring.Services.WindowsService.Tests.build @@ -41,6 +41,7 @@ diff --git a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.build b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.build index 4918e874..4e8e9251 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.build +++ b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj index 776b9e23..c12b299e 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj +++ b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.csproj @@ -47,6 +47,7 @@ + diff --git a/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs b/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs new file mode 100644 index 00000000..1feb6043 --- /dev/null +++ b/test/Spring/Spring.Template.Velocity.Tests/VelocityCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Template.Velocity; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class VelocityCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (VelocityEngineFactory)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build b/test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build index ab0cb167..ed2441cb 100644 --- a/test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build +++ b/test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Testing.NUnit.Tests/NUnitCompilerOptionsTests.cs b/test/Spring/Spring.Testing.NUnit.Tests/NUnitCompilerOptionsTests.cs new file mode 100644 index 00000000..f8f2070b --- /dev/null +++ b/test/Spring/Spring.Testing.NUnit.Tests/NUnitCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Testing.NUnit; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class NUnitCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (AbstractSpringContextTests)); + } + } +} \ No newline at end of file diff --git a/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2008.csproj b/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2008.csproj index fa5fe486..62ecee19 100644 --- a/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2008.csproj +++ b/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2008.csproj @@ -51,6 +51,7 @@ + diff --git a/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build b/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build index be8c763e..a2c6409b 100644 --- a/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build +++ b/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build @@ -13,6 +13,7 @@ diff --git a/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2008.csproj b/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2008.csproj index 15635b81..f26b1205 100644 --- a/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2008.csproj +++ b/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2008.csproj @@ -98,6 +98,7 @@ ASPXCodeBehind + diff --git a/test/Spring/Spring.Web.Tests/Spring.Web.Tests.build b/test/Spring/Spring.Web.Tests/Spring.Web.Tests.build index 93e2d9df..9183dc0a 100644 --- a/test/Spring/Spring.Web.Tests/Spring.Web.Tests.build +++ b/test/Spring/Spring.Web.Tests/Spring.Web.Tests.build @@ -11,8 +11,12 @@ --> - + diff --git a/test/Spring/Spring.Web.Tests/WebCompilerOptionsTests.cs b/test/Spring/Spring.Web.Tests/WebCompilerOptionsTests.cs new file mode 100644 index 00000000..1375329d --- /dev/null +++ b/test/Spring/Spring.Web.Tests/WebCompilerOptionsTests.cs @@ -0,0 +1,43 @@ +#region License + +/* + * Copyright 2004-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System.Reflection; +using NUnit.Framework; +using Spring.Context.Support; + +#endregion + +namespace Spring +{ + /// Test that the assembly is built with the correct DebugAttributes in release and debug builds. + /// + /// Mark Pollack + [TestFixture] + public sealed class WebCompilerOptionTests : CompilerOptionsTests + { + [TestFixtureSetUp] + public void FixtureSetUp() + { + AssemblyToCheck = Assembly.GetAssembly(typeof (WebApplicationContext)); + } + } +} \ No newline at end of file