SPRNET-1280 - Create integration test project for TIBCO EMS
This commit is contained in:
35
Spring.build
35
Spring.build
@@ -28,7 +28,15 @@ Build properties that may be set:
|
||||
|
||||
"test.integration.data":
|
||||
values: bool: true|false
|
||||
set this to true to run integration tests
|
||||
set this to true to run integration tests that access a database
|
||||
|
||||
"test.integration.ems":
|
||||
values: bool: true|false
|
||||
set this to true to run integration tests that access TIBCO EMS
|
||||
|
||||
"test.integration.nms":
|
||||
values: bool: true|false
|
||||
set this to true to run integration tests that access ActiveMQ
|
||||
|
||||
"test.full":
|
||||
values: bool: true|false
|
||||
@@ -54,6 +62,17 @@ Running Integration Tests:
|
||||
on the commandline enable the "test.integration.data" flag, e.g.:
|
||||
nant test -f:spring.build -D:test.integration.data=true
|
||||
|
||||
*) TIBCO EMS Integration Tests
|
||||
- You need to have an EMS instance running at the URL tcp://localhost:7222
|
||||
|
||||
on the commandline enable the "test.integration.ems" flag, e.g.:
|
||||
nant test -f:spring.build -D:test.integration.ems=true
|
||||
|
||||
*) ActiveMQ Inegration Tests
|
||||
|
||||
on the commandline enable the "test.integration.nms" flag, e.g.:
|
||||
nant test -f:spring.build -D:test.integration.nms=true
|
||||
|
||||
|
||||
|
||||
Commandline Examples:
|
||||
@@ -79,6 +98,8 @@ Commandline Examples:
|
||||
<!-- turn on all tests if test.full specified -->
|
||||
<property name="test.full" value="false" />
|
||||
<property name="test.integration.data" value="${test.full}" />
|
||||
<property name="test.integration.ems" value="${test.full}" />
|
||||
<property name="test.integration.nms" value="${test.full}" />
|
||||
|
||||
<!--
|
||||
the line below is for the ccnet build box - see target set-user-overrides for how to change this to your machine values if necessary
|
||||
@@ -433,11 +454,10 @@ Commandline Examples:
|
||||
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web}"/>
|
||||
<nant buildfile="test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build" target="test" if="${build-testing-nunit}"/>
|
||||
<nant buildfile="test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build" target="test" if="${build-testing-microsoft and nant.settings.currentframework == 'net-2.0'}"/>
|
||||
<!--
|
||||
<nant buildfile="test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build" target="test" if="${build-ems and (nant.settings.currentframework == 'net-2.0') and not net-3.0}"/>
|
||||
-->
|
||||
<nant buildfile="test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.build" target="test" if="${build-ems and (nant.settings.currentframework == 'net-2.0') and not net-3.0}"/>
|
||||
<nant buildfile="test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build" target="test" if="${build-nms}"/>
|
||||
<nant buildfile="test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build" target="build" if="${build-quartz }"/>
|
||||
<nant buildfile="test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.build" target="build" if="${build-quartz}"/>
|
||||
<nant buildfile="test/Spring/Spring.Messaging.Tests/Spring.Messaging.Tests.build" target="test" if="${build-msmq}"/>
|
||||
<nant buildfile="test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.build" target="test" if="${build-velocity}"/>
|
||||
|
||||
@@ -530,8 +550,7 @@ Commandline Examples:
|
||||
|
||||
</target>
|
||||
|
||||
<target name="copylibs">
|
||||
<echo message="Current bin dir = ${current.bin.dir}"/>
|
||||
<target name="copylibs"> <echo message="Current bin dir = ${current.bin.dir}"/>
|
||||
<echo message="Current lib dir = ${lib.dir}"/>
|
||||
<!-- copy framework-neutral libraries -->
|
||||
<copy todir="${current.bin.dir}">
|
||||
@@ -1444,6 +1463,8 @@ Commandline Examples:
|
||||
<target name="set-build-namespaces-all">
|
||||
<property name="build.allnamespaces" value="true"/>
|
||||
<property name="test.integration.data" value="false" />
|
||||
<property name="test.integration.ems" value="false" />
|
||||
<property name="test.integration.nms" value="false" />
|
||||
<property name="build-aop" value="true" />
|
||||
<property name="build-data" value="true" />
|
||||
<property name="build-services" value="true" />
|
||||
@@ -1481,6 +1502,8 @@ Commandline Examples:
|
||||
</target>
|
||||
<target name="set-build-namespaces-release">
|
||||
<property name="test.integration.data" value="false" />
|
||||
<property name="test.integration.ems" value="false" />
|
||||
<property name="test.integration.nms" value="false" />
|
||||
<property name="build-aop" value="true"/>
|
||||
<property name="build-data" value="true"/>
|
||||
<property name="build-services" value="true"/>
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace Spring.Messaging.Ems.Config
|
||||
if (containerElement.HasAttribute(AUTO_STARTUP))
|
||||
{
|
||||
string autoStartup = containerElement.GetAttribute(AUTO_STARTUP);
|
||||
if (!StringUtils.HasText(autoStartup))
|
||||
if (StringUtils.HasText(autoStartup))
|
||||
{
|
||||
containerDef.AddPropertyValue("AutoStartup", autoStartup);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<object id="emsConnectionFactory" type="Spring.Messaging.Ems.Common.EmsConnectionFactory, Spring.Messaging.Ems">
|
||||
<constructor-arg name="serverUrl" value="tcp://localhost:7222"/>
|
||||
<constructor-arg name="clientId" value="SpringEMSClient"/>
|
||||
<constructor-arg name="clientId" value="SpringEMSClient2"/>
|
||||
<property name="ConnAttemptCount" value="10" />
|
||||
<property name="ConnAttemptDelay" value="100" />
|
||||
<property name="ConnAttemptTimeout" value="1000" />
|
||||
@@ -34,7 +34,10 @@
|
||||
</dictionary>
|
||||
</property>
|
||||
-->
|
||||
|
||||
<object id="jndiEmsConnectionFactory" type="Spring.Messaging.Ems.Jndi.JndiLookupFactoryObject, Spring.Messaging.Ems">
|
||||
<property name="JndiName" value="TopicConnectionFactory"/>
|
||||
<property name="JndiProperties[LookupContext.PROVIDER_URL]" value="tibjmsnaming://localhost:7222"/>
|
||||
</object>
|
||||
|
||||
|
||||
<object id="simpleGateway" type="Spring.Messaging.Ems.Core.SimpleGateway, Spring.Messaging.Ems.Integration.Tests">
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" ?>
|
||||
<project name="Spring.Messaging.Ems.Integration.Tests" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
|
||||
|
||||
<include buildfile="${spring.basedir}/common-project.include" />
|
||||
|
||||
<!--
|
||||
Required properties:
|
||||
* current.bin.dir - (path) root level to build to
|
||||
* current.build.debug - (true|false) debug build?
|
||||
* current.build.defines.csc - framework-specific build defines for C# compiler
|
||||
-->
|
||||
<target name="build">
|
||||
|
||||
<!-- build Spring.Messaging.Ems.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">
|
||||
<nowarn>
|
||||
<warning number="${nowarn.numbers.test}" />
|
||||
</nowarn>
|
||||
<sources failonempty="true">
|
||||
<include name="../Spring.Messaging.Ems.Integration.Tests/**/*.cs" />
|
||||
<include name="**/*.cs" />
|
||||
<exclude name="AssemblyInfo.cs" />
|
||||
</sources>
|
||||
<references basedir="${current.bin.dir}">
|
||||
<include name="System.Data.dll" />
|
||||
<include name="System.EnterpriseServices.dll" />
|
||||
<include name="*.dll" />
|
||||
<include name="Spring.Messaging.Ems.dll" />
|
||||
</references>
|
||||
<resources prefix="Spring" dynamicprefix="true" failonempty="true">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.sql" />
|
||||
</resources>
|
||||
<resources prefix="Spring" dynamicprefix="true" basedir="../Spring.Data.NHibernate.Integration.Tests" failonempty="true">
|
||||
<include name="**/*.sql" />
|
||||
</resources>
|
||||
</csc>
|
||||
|
||||
<copy file="${project::get-base-directory()}/${project::get-name()}.dll.config"
|
||||
tofile="${current.bin.dir}/${project::get-name()}.dll.config"/>
|
||||
|
||||
<copy todir="${current.bin.dir}" overwrite="true">
|
||||
<fileset basedir="${project::get-base-directory()}">
|
||||
<include name="Spring.Messaging.Ems.Integration.Tests.dll.config" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<property name="test.assemblyfile" value="${project::get-name()}.dll" />
|
||||
<call target="common.run-tests" if="${test.integration.ems}" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -23,7 +23,6 @@
|
||||
using NUnit.Framework;
|
||||
using Rhino.Mocks;
|
||||
using Spring.Messaging.Ems.Common;
|
||||
using Spring.Messaging.Nms.Connections;
|
||||
using TIBCO.EMS;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using Spring.Messaging.Ems.Common;
|
||||
using Spring.Messaging.Nms.Connections;
|
||||
using TIBCO.EMS;
|
||||
|
||||
namespace Spring.Messaging.Ems.Connections
|
||||
|
||||
@@ -21,12 +21,10 @@
|
||||
using System;
|
||||
using Rhino.Mocks;
|
||||
using Spring.Messaging.Ems.Common;
|
||||
using Spring.Messaging.Ems.Connections;
|
||||
using TIBCO.EMS;
|
||||
|
||||
namespace Spring.Messaging.Nms.Connections
|
||||
namespace Spring.Messaging.Ems.Connections
|
||||
{
|
||||
|
||||
public class TestSession : ISession
|
||||
{
|
||||
private MockRepository mocks = new MockRepository();
|
||||
|
||||
Reference in New Issue
Block a user