made Spring.Messaging.Tests compile

This commit is contained in:
eeichinger
2009-07-30 10:51:26 +00:00
parent a6f638b2e8
commit 1a8d11815a
11 changed files with 56 additions and 130 deletions

View File

@@ -4,7 +4,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
BreakingChanges.txt = BreakingChanges.txt
changelog.txt = changelog.txt
common-project.include = common-project.include
readme.txt = readme.txt
Spring.build = Spring.build
Spring.include = Spring.include
EndProjectSection
EndProject

View File

@@ -34,7 +34,7 @@ Build properties that may be set:
<!-- default location of mstest executable -->
<!-- See target set-user-overrides for how to change this to your machine values -->
<!-- See target set-user-overrides for how to change this to your machine values -->
<property name="vs-net.mstest.bin.dir" value="K:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE"/>
<!-- debug or release -->
@@ -380,7 +380,7 @@ Build properties that may be set:
<nant buildfile="src/Spring/Spring.Services/Spring.Services.build" target="build" if="${build-services}"/>
<nant buildfile="src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.build" target="build" if="${build-testing and not net-3.0}"/>
<nant buildfile="src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build" target="build" if="${build-testing-mstest and (nant.settings.currentframework == 'net-2.0') and not net-3.0}"/>
<nant buildfile="src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build" target="build" if="${build-nms and not net-3.0}"/>
<nant buildfile="src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build" target="build" if="${build-ems and not net-3.0}"/>
<nant buildfile="src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.build" target="build" if="${build-nms and not net-3.0}"/>
<nant buildfile="src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build" target="build" if="${build-quartz and not net-3.0}"/>
<nant buildfile="src/Spring/Spring.Messaging/Spring.Messaging.build" target="build" if="${build-msmq and not net-3.0}"/>
@@ -409,12 +409,10 @@ Build properties that may be set:
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build" target="test" if="${not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build" target="test" if="${build-testing-mstest and (nant.settings.currentframework == 'net-2.0') and not net-3.0}"/>
<!--
<nant buildfile="test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build" target="test" if="${build-nms and not net-3.0}"/>
-->
<nant buildfile="test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build" target="test" if="${build-ems and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build" target="test" if="${build-nms and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build" target="build" if="${build-quartz and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build" target="test" if="${build-msmq-tests and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build" target="test" if="${build-msmq and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.build" target="test" if="${build-velocity and not net-3.0}"/>
<!-- build examples -->
@@ -432,6 +430,7 @@ Build properties that may be set:
<!-- disable namespaces not supported in net-1.0 -->
<property name="build-web" value="false" />
<property name="build-nms" value="false" />
<property name="build-ems" value="false" />
<property name="build-quartz" value="false" />
<property name="build-msmq" value="false" />
<property name="build-msmq-tests" value="false" />
@@ -443,8 +442,8 @@ Build properties that may be set:
depends="set-net-1.1-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<call target="copykeys" if="${project.build.sign}"/>
<call target="common.generate-assemblyinfo"/>
<property name="build-ems" value="false" />
<property name="build-nms" value="false" />
<property name="build-quartz" value="true" />
<property name="build-msmq" value="false" />
<property name="build-msmq-tests" value="false" />
<property name="build-velocity" value="false" />
@@ -455,11 +454,7 @@ Build properties that may be set:
depends="set-net-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<call target="copykeys" if="${project.build.sign}"/>
<call target="common.generate-assemblyinfo"/>
<property name="build-nms" value="true" />
<property name="build-quartz" value="true" />
<property name="build-msmq" value="true" />
<property name="build-msmq-tests" value="false" />
<property name="build-velocity" value="true" />
<property name="build-ems" value="false" />
<call target="compile-test" />
</target>
@@ -467,6 +462,7 @@ Build properties that may be set:
depends="set-net-3.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<call target="copykeys" if="${project.build.sign}"/>
<call target="common.generate-assemblyinfo"/>
<property name="build-ems" value="false" />
<property name="build-nms" value="false" />
<property name="build-quartz" value="false" />
<property name="build-msmq" value="false" />
@@ -479,6 +475,7 @@ Build properties that may be set:
depends="set-net-3.5-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<call target="copykeys" if="${project.build.sign}"/>
<call target="common.generate-assemblyinfo"/>
<property name="build-ems" value="false" />
<property name="build-nms" value="false" />
<property name="build-quartz" value="false" />
<property name="build-msmq" value="false" />
@@ -486,16 +483,14 @@ Build properties that may be set:
<property name="build-velocity" value="false" />
<call target="compile-test" />
</target>
<target name="compile-mono-2.0" description="Builds MONO Framework 2.0 version"
depends="set-mono-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<call target="copykeys" if="${project.build.sign}"/>
<call target="common.generate-assemblyinfo"/>
<property name="build-nms" value="true" />
<property name="build-quartz" value="true" />
<property name="build-ems" value="false" />
<property name="build-msmq" value="false" />
<property name="build-msmq-tests" value="false" />
<property name="build-velocity" value="true" />
<call target="compile-test" />
</target>
@@ -1076,7 +1071,7 @@ Build properties that may be set:
<include name="**/Spring.Data.NHibernate21.dll"/>
<include name="**/Spring.Data.NHibernate21.xml"/>
<include name="**/Spring.Data.NHibernate21.pdb"/>
<include name="**/Spring.Web.dll"/>
<include name="**/Spring.Web.xml"/>
<include name="**/Spring.Web.pdb"/>
@@ -1421,13 +1416,17 @@ Build properties that may be set:
</target>
<target name="set-build-namespaces-all">
<property name="build.allnamespaces" value="true"/>
<property name="build-aop" value="true"/>
<property name="build-data" value="true"/>
<property name="build-services" value="true"/>
<property name="build-testing" value="true"/>
<property name="build-aop" value="true" overwrite="false" />
<property name="build-data" value="true" overwrite="false"/>
<property name="build-services" value="true" overwrite="false" />
<property name="build-testing" value="true" overwrite="false" />
<property name="build-testing-mstest" value="false" overwrite="false"/>
<property name="build-winservices" value="true"/>
<property name="build-web" value="true"/>
<property name="build-web" value="true" overwrite="false" />
<property name="build-nms" value="true" overwrite="false" />
<property name="build-ems" value="false" overwrite="false" />
<property name="build-quartz" value="true" overwrite="false" />
<property name="build-msmq" value="true" overwrite="false" />
<property name="build-velocity" value="true" overwrite="false" />
<property name="solution.file" value="Spring.Net.sln"/>
<fileset id="src.to.copy">
<include name="src/**"/>
@@ -1459,9 +1458,13 @@ Build properties that may be set:
<property name="build-services" value="true"/>
<property name="build-testing" value="true"/>
<property name="build-testing-mstest" value="false" overwrite="false"/>
<property name="build-winservices" value="true"/>
<property name="build-web" value="true"/>
<property name="build-examples" value="true"/>
<property name="build-nms" value="true" />
<property name="build-ems" value="false" overwrite="false" />
<property name="build-quartz" value="true" />
<property name="build-msmq" value="true" />
<property name="build-velocity" value="true" />
<property name="solution.file.2003" value="Spring.Net.2003.sln"/>
<property name="solution.file.2005" value="Spring.Net.2005.sln"/>
<property name="solution.file.2008" value="Spring.Net.2008.sln"/>
@@ -1546,58 +1549,4 @@ Build properties that may be set:
<!-- loadtasks assembly="${spring.basedir}/build-support/tools/NAnt.NUnit2OutProc.Task/NAnt.NUnit2OutProcTasks.dll" / -->
</target>
<!-- Clover.NET code coverage targets... -->
<target name="CloverInit">
<!-- initializes the Clover environment -->
<echo message="Building with Clover.NET..."/>
<if test="${not property::exists('Clover.home')}">
<property name="Clover.home" value="K:\Program Files\Cenqua\Clover.NET 2.0 for .NET 2.0\"/>
</if>
<!-- 1595 - (Clover.NET workaround) 'type' is defined in multiple places; using definition from 'assembly' -->
<property name="nowarn.numbers" value="${nowarn.numbers},1595"/>
<copy todir="${Clover.home}" failonerror="false" overwrite="true">
<fileset basedir=".">
<include name="clovernet.license"/>
</fileset>
</copy>
<!-- Note: Using custom build CloverNant tasks -->
<loadtasks assembly="${Clover.home}\CloverNAnt-0.85.dll"/>
<clover-setup initstring="CloverBuild\clover.cdb" builddir="CloverBuild" enabled="true" flatten="false">
<fileset basedir=".">
<include name="src/Spring/Spring.Data/**/*"/>
<exclude name="examples/**/*"/>
<exclude name="test/**/*"/>
<exclude name="src/Spring/CommonAssemblyInfo.cs"/>
</fileset>
</clover-setup>
</target>
<target name="CloverClean">
<delete dir="CloverBuild" failonerror="false"/>
<!-- delete any Cloverised output lying around from previous Cloverisings -->
<property name="target.dir"
value="${project::get-base-directory()}/build/${nant.settings.currentframework}.${nant.platform.name}"/>
<delete
dir="${project::get-base-directory()}/build/${nant.settings.currentframework}.${nant.platform.name}/bin"
if="${directory::exists(target.dir)}"
failonerror="false"/>
</target>
<target name="CloverTest" depends="CloverInit">
<!-- let Clover instrument a debug build -->
<property name="using-clover" value="true"/>
<call target="test"/>
</target>
<target name="CloverReport" depends="CloverInit">
<clover-report>
<current title="${project.name} Code Coverage" output="report">
<format type="html"/>
</current>
</clover-report>
</target>
<target name="CloverAll" depends="CloverClean, CloverReport, CloverClean"
description="Convenience target to execute the full Clover build cycle.">
</target>
<target name="clovercruise" depends="CloverAll"
description="Convenience target to execute the full Clover build cycle with reporting for cruise control.">
</target>
</project>

View File

@@ -34,28 +34,24 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\build\VS.NET.2005\Spring.Messaging.Ems\Debug\</OutputPath>
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\..\build\VS.NET.2005\Spring.Messaging.Ems\Debug\Spring.Messaging.Ems.xml</DocumentationFile>
<DocumentationFile>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems\Debug\Spring.Messaging.Ems.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591,0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\build\VS.NET.2005\Spring.Messaging.Ems\Release\</OutputPath>
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems\Release\</OutputPath>
<DefineConstants>TRACE;NET_2_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath>
</Reference>
<Reference Include="Common.Logging, Version=1.1.0.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL">
<Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\net\2.0\Common.Logging.dll</HintPath>
</Reference>
@@ -183,7 +179,7 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>

View File

@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.21022</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -187,6 +187,9 @@
<Compile Include="Transaction\Interceptor\TransactionAttributeSourceTests.cs" />
<Compile Include="Transaction\Interceptor\TransactionInterceptorTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Spring.Data.Tests.build" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>

View File

@@ -2,9 +2,9 @@
<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>{94E4E1B4-D424-4EB9-BF34-2EE8CC3D7048}</ProjectGuid>
<ProjectGuid>{66BD9467-AAC7-4FD9-901B-AB08C8C1FC21}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Spring</RootNamespace>
@@ -34,7 +34,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\build\VS.NET.2005\Spring.Messaging.Ems.Tests\Debug\</OutputPath>
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems.Tests\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -44,7 +44,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\build\VS.NET.2005\Spring.Messaging.Ems.Tests\Release\</OutputPath>
<OutputPath>..\..\..\build\VS.NET.2008\Spring.Messaging.Ems.Tests\Release\</OutputPath>
<DefineConstants>TRACE;NET_2_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -54,7 +54,7 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.framework, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\net\2.0\nunit.framework.dll</HintPath>
</Reference>
@@ -155,7 +155,7 @@
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>

View File

@@ -36,13 +36,13 @@ namespace Spring.Messaging.Core
{
protected override string[] ConfigLocations
{
get { return new[] {"assembly://Spring.Messaging.Tests/Spring.Messaging.Core/MessageQueueMetadataCacheTests.xml"}; }
get { return new string[] {"assembly://Spring.Messaging.Tests/Spring.Messaging.Core/MessageQueueMetadataCacheTests.xml"}; }
}
[Test]
public void InitialzeMessageQueueMetadata()
{
var cache = new MessageQueueMetadataCache(applicationContext);
MessageQueueMetadataCache cache = new MessageQueueMetadataCache(applicationContext);
Assert.AreEqual(0, cache.Count);
cache.Initialize();
Assert.IsTrue(cache.Initalized);
@@ -52,7 +52,7 @@ namespace Spring.Messaging.Core
Assert.AreEqual(3, cache.Count);
Assert.IsNull(cache.Get(@".\Private$\testqueue"));
var paths = new[]
string[] paths = new string[]
{
@".\Private$\testtxqueue",
@"FormatName:Direct=TCP:192.168.1.105\Private$\testtxqueue",
@@ -60,7 +60,7 @@ namespace Spring.Messaging.Core
};
Assert.That(paths, Is.EquivalentTo(cache.Paths));
paths = new[] {@".\Private$\testtxqueue", @"FormatName:Direct=TCP:192.168.1.105\Private$\testtxqueue"};
paths = new string[] {@".\Private$\testtxqueue", @"FormatName:Direct=TCP:192.168.1.105\Private$\testtxqueue"};
cache.RemoveAll(paths);
Assert.AreEqual(1, cache.Count);
cache.Clear();

View File

@@ -266,7 +266,7 @@ namespace Spring.Messaging.Core
#region Some simple driver code for debugging
public void SimpleRemoteConsumption()
{
string connectionWorking = @"FormatName:Direct=OS:MARKT60\Private$\testqueue";
// string connectionWorking = @"FormatName:Direct=OS:MARKT60\Private$\testqueue";
//TCP:IP doesn't work...
MessageQueue rmQ = new MessageQueue(@"FormatName:Direct=TCP:192.168.1.105\Private$\testqueue");

View File

@@ -31,7 +31,6 @@ namespace Spring.Messaging.Core
/// This class contains tests for
/// </summary>
/// <author>Mark Pollack</author>
/// <version>$Id:$</version>
[TestFixture]
public class ThreadingTests
{

View File

@@ -6,30 +6,4 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Spring.Messaging.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Spring.Messaging.Test")]
[assembly: AssemblyCopyright("Copyright © 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("75d6d9a9-9fcf-45ff-9691-1b0cc086e243")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyDescription("Unit Tests for the Spring.Messaging assembly")]

View File

@@ -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>{41BC3AEA-7EB3-48BF-B1EC-84119376AC98}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -106,6 +106,9 @@
</Compile>
<Compile Include="Messaging\Support\MessageAlreadyProcessedException.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Spring.Messaging.Tests.build" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<project name="Spring.Messaging.Nms.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
<project name="Spring.Messaging.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
<include buildfile="${spring.basedir}/common-project.include" />
@@ -39,7 +39,7 @@
<target name="test" depends="build">
<!-- property name="test.assemblyname" value="${project::get-name()}" / -->
<call target="common.run-tests" />
<!-- call target="common.run-tests" / -->
</target>
<!--