SPRNET-1268 - Spring Exceptions should pass tests to ensure compliance with .NET framework guidelines.
SPRNET-1267 - Add optimize compiler flag for release build
This commit is contained in:
@@ -296,6 +296,7 @@
|
||||
<target name="set-debug-build-configuration">
|
||||
<property name="compiler.args" value=""/>
|
||||
<property name="net-2.0" value="false"/>
|
||||
<property name="build.optimize" value="false"/>
|
||||
<property name="build.debug" value="Full"/>
|
||||
<property name="build.defines.csc" value="DEBUG,TRACE"/>
|
||||
<property name="build.defines.jsc" value="DEBUG,TRACE"/>
|
||||
@@ -309,6 +310,7 @@
|
||||
<target name="set-release-build-configuration">
|
||||
<property name="compiler.args" value=""/>
|
||||
<property name="net-2.0" value="false"/>
|
||||
<property name="build.optimize" value="true"/>
|
||||
<property name="build.debug" value="PdbOnly"/>
|
||||
<property name="build.defines.csc" value="TRACE,STRONG"/>
|
||||
<property name="build.defines.jsc" value="TRACE,STRONG"/>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<!-- build Spring.Aop -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -1181,17 +1181,21 @@
|
||||
</Compile>
|
||||
<None Include="Expressions\Expression.g" />
|
||||
<EmbeddedResource Include="Objects\Factory\Xml\spring-tool-1.1.xsd">
|
||||
<SubType>
|
||||
</SubType>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Objects\Factory\Xml\spring-objects-1.1.xsd">
|
||||
<SubType>
|
||||
</SubType>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Objects\Factory\Xml\spring-objects-1.3.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Objects\Factory\Xml\spring-objects-1.3.xsd" />
|
||||
<None Include="Spring.Core.build" />
|
||||
<EmbeddedResource Include="Validation\Config\spring-validation-1.3.xsd" />
|
||||
<EmbeddedResource Include="Validation\Config\spring-validation-1.1.xsd" />
|
||||
<EmbeddedResource Include="Validation\Config\spring-validation-1.3.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Validation\Config\spring-validation-1.1.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<csc target="library"
|
||||
define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -68,6 +68,21 @@ namespace Spring.Data.NHibernate
|
||||
/// </param>
|
||||
public HibernateAdoException( string message, ADOException rootCause ) : base( message, rootCause ) {}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the HibernateSystemException class with the specified message
|
||||
/// and root cause.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
/// <param name="rootCause">
|
||||
/// The root exception that is being wrapped.
|
||||
/// </param>
|
||||
public HibernateAdoException(string message, Exception rootCause) : base(message, rootCause)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="HibernateAdoException"/> class.
|
||||
|
||||
@@ -46,6 +46,15 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="HibernateQueryException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
public HibernateQueryException(string message) : base(message) { }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateQueryException"/> class.
|
||||
/// </summary>
|
||||
@@ -54,6 +63,21 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the HibernateQueryException class with the specified message
|
||||
/// and root cause.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
/// <param name="rootCause">
|
||||
/// The root exception that is being wrapped.
|
||||
/// </param>
|
||||
public HibernateQueryException(string message, Exception rootCause)
|
||||
: base(message, rootCause)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the query string that was invalid.
|
||||
/// </summary>
|
||||
|
||||
@@ -42,11 +42,32 @@ namespace Spring.Data.NHibernate
|
||||
#region Constructor (s)
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateSystemException"/> class.
|
||||
/// </summary>
|
||||
public HibernateSystemException()
|
||||
/// </summary>
|
||||
public HibernateSystemException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateSystemException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public HibernateSystemException(string message): base(message)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates a new instance of the HibernateSystemException class with the specified message
|
||||
/// and root cause.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
/// <param name="rootCause">
|
||||
/// The root exception that is being wrapped.
|
||||
/// </param>
|
||||
public HibernateSystemException(string message, Exception rootCause) : base(message, rootCause)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateSystemException"/> class.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<!-- build Spring.Data.NHibernate -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -53,6 +53,15 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="HibernateOptimisticLockingFailureException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
public HibernateOptimisticLockingFailureException(string message) : base(message) { }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateOptimisticLockingFailureException"/> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<!-- build Spring.Data.NHibernate12 -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -51,6 +51,15 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateObjectRetrievalFailureException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public HibernateObjectRetrievalFailureException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateObjectRetrievalFailureException"/> class.
|
||||
@@ -84,9 +93,25 @@ namespace Spring.Data.NHibernate
|
||||
/// </summary>
|
||||
/// <param name="ex">The ex.</param>
|
||||
public HibernateObjectRetrievalFailureException(WrongClassException ex) : base(ex.EntityName, ex.Identifier, ex.Message, ex)
|
||||
{
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the HibernateObjectRetrievalFailureException class with the specified message
|
||||
/// and root cause.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
/// <param name="rootCause">
|
||||
/// The root exception that is being wrapped.
|
||||
/// </param>
|
||||
public HibernateObjectRetrievalFailureException(string message, Exception rootCause)
|
||||
: base(message, rootCause)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="HibernateObjectRetrievalFailureException"/> class.
|
||||
|
||||
@@ -54,6 +54,15 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="HibernateOptimisticLockingFailureException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
public HibernateOptimisticLockingFailureException(string message) : base(message) { }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HibernateOptimisticLockingFailureException"/> class.
|
||||
/// </summary>
|
||||
@@ -70,6 +79,21 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message
|
||||
/// and root cause.
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// A message about the exception.
|
||||
/// </param>
|
||||
/// <param name="rootCause">
|
||||
/// The root exception that is being wrapped.
|
||||
/// </param>
|
||||
public HibernateOptimisticLockingFailureException(string message, Exception rootCause)
|
||||
: base(message, rootCause)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="HibernateOptimisticLockingFailureException"/> class.
|
||||
@@ -86,6 +110,8 @@ namespace Spring.Data.NHibernate
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<!-- build Spring.Data.NHibernate20 -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<!-- build Spring.Data.NHibernate21 -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.NHibernate30 -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<!-- build Spring.Data -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="false"
|
||||
warnaserror="false"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
@@ -35,4 +36,4 @@
|
||||
</csc>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="false"
|
||||
warnaserror="false"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
@@ -35,4 +36,4 @@
|
||||
</csc>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Spring.Messaging
|
||||
/// Base exception class for exceptions thrown by Spring in Spring.Messaging
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[Serializable]
|
||||
public class MessagingException : ApplicationException
|
||||
{
|
||||
#region Constructor (s) / Destructor
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="false"
|
||||
warnaserror="false"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
@@ -29,4 +30,4 @@
|
||||
</csc>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
@@ -30,4 +31,4 @@
|
||||
</csc>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<!-- build Spring.Services -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="false"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
@@ -32,4 +33,4 @@
|
||||
</csc>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="false"
|
||||
warnaserror="false"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="false"
|
||||
warnaserror="false"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<!-- build Spring.Web.Extensions -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<!-- build Spring.Web -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{EDDC48D5-4F25-4476-9BA3-12F2E8BB5A8C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
@@ -51,7 +51,9 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e" />
|
||||
<Reference Include="Spring.Core, Version=1.3.0.20210, Culture=neutral, processorArchitecture=MSIL" />
|
||||
<Reference Include="Spring.Core, Version=1.3.0.20210, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
|
||||
43
test/Spring/Spring.Aop.Tests/AopCompilerOptionsTests.cs
Normal file
43
test/Spring/Spring.Aop.Tests/AopCompilerOptionsTests.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>Test that the AOP assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class AopCompilerOptionsTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (TruePointcut));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -267,6 +267,7 @@
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AopCompilerOptionsTests.cs" />
|
||||
<None Include="Spring.Aop.Tests.build" />
|
||||
<None Include="Spring.Aop.Tests.dll.config" />
|
||||
<EmbeddedResource Include="Aop\Config\AopNamespaceParserTests.xml" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Aop -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
134
test/Spring/Spring.Core.Tests/CompilerOptionsTests.cs
Normal file
134
test/Spring/Spring.Core.Tests/CompilerOptionsTests.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests the various exception classes.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Shamelessly lifted from the NAnt test suite.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Specify the assembly whose metadata will be checked for a given release mode (debug/release).
|
||||
/// </summary>
|
||||
protected Assembly AssemblyToCheck
|
||||
{
|
||||
get { return _assemblyToCheck; }
|
||||
set { _assemblyToCheck = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Assembly _assemblyToCheck = null;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
43
test/Spring/Spring.Core.Tests/CoreCompilerOptionsTests.cs
Normal file
43
test/Spring/Spring.Core.Tests/CoreCompilerOptionsTests.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>Test that the AOP assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class CoreCompilerOptionsTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (ObjectsException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,6 +220,7 @@
|
||||
<Compile Include="Context\Support\XmlApplicationContextTests.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CoreCompilerOptionsTests.cs" />
|
||||
<Compile Include="CoreExceptionTests.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -274,9 +275,10 @@
|
||||
<Compile Include="Core\TypeResolution\TypeResolverTests.cs" />
|
||||
<Compile Include="DataBinding\SimpleExpressionBindingTests.cs" />
|
||||
<Compile Include="DataBinding\BaseBindingManagerTests.cs" />
|
||||
<Compile Include="ExceptionsTest.cs">
|
||||
<Compile Include="CompilerOptionsTests.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ExceptionsTest.cs" />
|
||||
<Compile Include="Expressions\ConstructorNodeTests.cs" />
|
||||
<Compile Include="Expressions\ExpressionEvaluatorTests.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<!-- build Spring.Data.NHibernate.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<!-- build Spring.Data.NHibernate20.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate20.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0</DefineConstants>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -94,6 +94,8 @@
|
||||
<Compile Include="..\Spring.Data.NHibernate.Tests\Data\NHibernate\TestObject.cs">
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="HibernateCompilerOptionsTests.cs" />
|
||||
<Compile Include="HibernateExceptionTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate20.Tests.build" />
|
||||
@@ -118,6 +120,10 @@
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2008.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2008</Name>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
@@ -38,7 +39,7 @@
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="*.dll" />
|
||||
<include name="Spring.Data.NHibernate20.dll" />
|
||||
<include name="Spring.Data.NHibernate20.dll" />
|
||||
<exclude name="Spring.Data.NHibernate.dll" />
|
||||
<exclude name="Spring.Data.NHibernate12*.dll" />
|
||||
<exclude name="Spring.Data.NHibernate21*.dll" />
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<!-- build Spring.Data.NHibernate21.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data.Hibernernate20 library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
public sealed class HibernateExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof(HibernateObjectRetrievalFailureException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\build\VS.Net.2008\Spring.Data.NHibernate21.Tests\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NET_2_0,NET_2_1</DefineConstants>
|
||||
<DefineConstants>TRACE;NET_2_0,NH_2_1</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -91,6 +91,8 @@
|
||||
<Link>Data\NHibernate\TestObject.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="HibernateCompilerOptionsTests.cs" />
|
||||
<Compile Include="HibernateExceptionTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Spring.Data.NHibernate21.Tests.build" />
|
||||
@@ -115,6 +117,10 @@
|
||||
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
|
||||
<Name>Spring.Data.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Core.Tests\Spring.Core.Tests.2008.csproj">
|
||||
<Project>{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}</Project>
|
||||
<Name>Spring.Core.Tests.2008</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Spring.Data.Tests\Spring.Data.Tests.2008.csproj">
|
||||
<Project>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</Project>
|
||||
<Name>Spring.Data.Tests.2008</Name>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<!-- build Spring.Data.NHibernate30.Integration.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<target name="build">
|
||||
<csc target="library" define="${current.build.defines.csc},NH_2_0,NH_2_1"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
43
test/Spring/Spring.Data.Tests/DataCompilerOptionsTests.cs
Normal file
43
test/Spring/Spring.Data.Tests/DataCompilerOptionsTests.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class DataCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (CannotCreateTransactionException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,6 +171,7 @@
|
||||
<EmbeddedResource Include="Transaction\Config\TxNamespaceParserTests.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataCompilerOptionsTests.cs" />
|
||||
<Compile Include="Dao\Attributes\PersistenceExceptionTranslationAdvisorTests.cs" />
|
||||
<Compile Include="Dao\Attributes\PersistenceExceptionTranslationInterceptorTests.cs" />
|
||||
<Compile Include="Dao\Attributes\PersistenceExceptionTranslationPostProcessorTests.cs" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class NmsCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (ListenerExecutionFailedException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,6 +81,7 @@
|
||||
<Link>CommonAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="NmsCompilerOptionsTests.cs" />
|
||||
<Compile Include="Messaging\Nms\Config\NmsNamespaceHandlerTests.cs" />
|
||||
<Compile Include="Messaging\Nms\Connections\CachingConnectionFactoryTests.cs" />
|
||||
<Compile Include="Messaging\Nms\Connections\MessageTransactionManagerTests.cs" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class MessageAlreadyProcessedException : MessagingException
|
||||
{
|
||||
#region Constructor (s) / Destructor
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the Messaging assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class MessagingCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (MessagingException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit tests for all of the exception classes in the Spring.Data library...
|
||||
/// </summary>
|
||||
/// <author>Rick Evans</author>
|
||||
[TestFixture]
|
||||
public sealed class MessagingExceptionTests : ExceptionsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof(MessagingException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,6 +86,8 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MessagingCompilerOptionsTests.cs" />
|
||||
<Compile Include="MessagingExceptionTests.cs" />
|
||||
<Compile Include="Messaging\Core\MessageQueueMetadataCacheTests.cs" />
|
||||
<Compile Include="Messaging\Core\ThreadingTests.cs" />
|
||||
<Compile Include="Messaging\Listener\Adapter\MessageListenerAdapterTests.cs" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class QuartzCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (SchedulingException));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="QuartzCompilerOptionsTests.cs" />
|
||||
<Compile Include="Scheduling\Quartz\AdaptableJobFactoryTest.cs" />
|
||||
<Compile Include="Scheduling\Quartz\QuartzSupportTests.cs" />
|
||||
<Compile Include="Scheduling\Quartz\QuartzTestObject.cs" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class ServicesCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (CaoExporter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,7 @@
|
||||
<Compile Include="EnterpriseServices\ExeConfigurationSystemTests.cs" />
|
||||
<Compile Include="EnterpriseServices\ExportedServicedComponentSample.cs" />
|
||||
<Compile Include="EnterpriseServices\ServicedComponentExporterTests.cs" />
|
||||
<Compile Include="ServicesCompilerOptionsTests.cs" />
|
||||
<Compile Include="Remoting\BaseRemotingTestFixture.cs" />
|
||||
<Compile Include="Remoting\CaoExporterTests.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<!-- build Spring.Services.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<target name="build" depends="copy-test-support-files">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll" >
|
||||
<nowarn>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="VelocityCompilerOptionsTests.cs" />
|
||||
<Compile Include="Template\Velocity\Config\TemplateNamespaceParserTests.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityEngineFactoryObjectTests.cs" />
|
||||
<Compile Include="Template\Velocity\VelocityEngineTestBase.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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class VelocityCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (VelocityEngineFactory));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class NUnitCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (AbstractSpringContextTests));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Testing\Ado\SimpleAdoTestUtilsTests.cs" />
|
||||
<Compile Include="Testing\NUnit\AbstractDependencyInjectionSpringContextTestsTests.cs" />
|
||||
<Compile Include="NUnitCompilerOptionsTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!-- build Spring.Data.Tests -->
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Globalization\Resolvers\DefaultWebCultureResolverTests.cs" />
|
||||
<Compile Include="WebCompilerOptionsTests.cs" />
|
||||
<Compile Include="Objects\Factory\Support\WebObjectDefinitionFactoryTests.cs" />
|
||||
<Compile Include="Objects\Factory\Support\WebObjectDefinitionTests.cs" />
|
||||
<Compile Include="Objects\Factory\Support\WebObjectFactoryTests.cs">
|
||||
|
||||
@@ -11,8 +11,12 @@
|
||||
-->
|
||||
<target name="build">
|
||||
<!-- build Spring.Web -->
|
||||
<csc target="library" define="${current.build.defines.csc}" warnaserror="true" debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll" doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<csc target="library" define="${current.build.defines.csc}"
|
||||
warnaserror="true"
|
||||
optimize="${build.optimize}"
|
||||
debug="${current.build.debug}"
|
||||
output="${current.bin.dir}/${project::get-name()}.dll"
|
||||
doc="${current.bin.dir}/${project::get-name()}.xml">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" /> <!-- 1701 -->
|
||||
<warning number="${nowarn.numbers.test},1587" if="${nant.settings.currentframework=='mono-2.0'}"/>
|
||||
|
||||
43
test/Spring/Spring.Web.Tests/WebCompilerOptionsTests.cs
Normal file
43
test/Spring/Spring.Web.Tests/WebCompilerOptionsTests.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>Test that the assembly is built with the correct DebugAttributes in release and debug builds.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
[TestFixture]
|
||||
public sealed class WebCompilerOptionTests : CompilerOptionsTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp()
|
||||
{
|
||||
AssemblyToCheck = Assembly.GetAssembly(typeof (WebApplicationContext));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user