activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r684033 - in /activemq/activemq-dotnet: Apache.NMS.ActiveMQ/trunk/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/ Apache.NMS.ActiveMQ/trunk/src/test/csharp/ Apache.NMS/trunk/ Apache.NMS/trunk/lib/ Apache.NMS/trunk/src/test/csharp/
Date Fri, 08 Aug 2008 18:17:26 GMT
Author: jgomes
Date: Fri Aug  8 11:17:25 2008
New Revision: 684033

URL: http://svn.apache.org/viewvc?rev=684033&view=rev
Log:
Refactoring unit tests and the build process.  Removed support for obsolete platforms MONO 1.0, .NET 1.0, and .NET Compact Framework 1.0.
Upgraded NUnit version to 2.4.7 and included the assembly in the main repository so that it can be easily upgraded in future.
Fixes [AMQNET-71]. (See https://issues.apache.org/activemq/browse/AMQNET-71)

Added:
    activemq/activemq-dotnet/Apache.NMS/trunk/lib/
    activemq/activemq-dotnet/Apache.NMS/trunk/lib/nunit.framework.dll   (with props)
Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml Fri Aug  8 11:17:25 2008
@@ -198,18 +198,6 @@
     <property name="csc.optimize"                 value="true" />
   </target>
 
-  <target name="set-net-1.0-framework-configuration">
-    <property name="current.build.framework" value="net-1.0" />
-    <property name="current.build.framework.name" value=".NET 1.0"/>
-    <property name="current.build.defines" value="${build.defines}NET,NET_1_0" dynamic="true" />
-    <property name="current.build.framework.sign" value="true" />
-    <property name="link.sdkdoc.version" value="SDK_v1_0" />
-    <property name="link.sdkdoc.web" value="true" />
-    <if test="${framework::exists(current.build.framework)}">
-      <property name="nant.settings.currentframework" value="${current.build.framework}" />
-    </if>
-  </target>
-
   <target name="set-net-1.1-framework-configuration">
     <property name="current.build.framework" value="net-1.1" />
     <property name="current.build.framework.name" value=".NET 1.1"/>
@@ -246,18 +234,6 @@
     </if>
   </target>
 
-  <target name="set-netcf-1.0-framework-configuration">
-    <property name="current.build.framework" value="netcf-1.0" />
-    <property name="current.build.framework.name" value=".NET Compact Framework 1.0"/>
-    <property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_1_0" dynamic="true" />
-    <property name="current.build.framework.sign" value="false" />
-    <property name="link.sdkdoc.version" value="SDK_v1_1" />
-    <property name="link.sdkdoc.web" value="true" />
-    <if test="${framework::exists(current.build.framework)}">
-      <property name="nant.settings.currentframework" value="${current.build.framework}" />
-    </if>
-  </target>
-
   <target name="set-netcf-2.0-framework-configuration">
     <property name="current.build.framework" value="netcf-2.0" />
     <property name="current.build.framework.name" value=".NET Compact Framework 2.0"/>
@@ -270,18 +246,6 @@
     </if>
   </target>
 
-  <target name="set-mono-1.0-framework-configuration">
-    <property name="current.build.framework" value="mono-1.0" />
-    <property name="current.build.framework.name" value="Mono 1.0"/>
-    <property name="current.build.defines" value="${build.defines}MONO,MONO_1_0" dynamic="true" />
-    <property name="current.build.framework.sign" value="true" />
-    <property name="link.sdkdoc.version" value="SDK_v1_1" />
-    <property name="link.sdkdoc.web" value="true" />
-    <if test="${framework::exists(current.build.framework)}">
-      <property name="nant.settings.currentframework" value="${current.build.framework}" />
-    </if>
-  </target>
-
   <target name="set-mono-2.0-framework-configuration">
     <property name="current.build.framework" value="mono-2.0" />
     <property name="current.build.framework.name" value="Mono 2.0"/>
@@ -300,25 +264,19 @@
   <target name="compile-all" depends="release-init" description="Compile all build configurations for all runtime configurations">
     <echo message="Compiling all build configurations for all runtime configurations." />
     <call target="set-debug-configuration" />
-    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-compile" />
     <call target="set-net-1.1-framework-configuration"  /><call target="conditional-compile" />
     <call target="set-net-2.0-framework-configuration"  /><call target="conditional-compile" />
     <call target="set-net-3.5-framework-configuration"  /><call target="conditional-compile" />
-    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-compile" />
     <call target="set-mono-2.0-framework-configuration" /><call target="conditional-compile" />
-    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-compile" />
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile" />
 
     <!-- we can only do a release skip if the Key file is available -->
     <if test="${not build.skip.release}">
       <call target="set-release-configuration" />
-      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-compile" />
       <call target="set-net-1.1-framework-configuration"  /><call target="conditional-compile" />
       <call target="set-net-2.0-framework-configuration"  /><call target="conditional-compile" />
       <call target="set-net-3.5-framework-configuration"  /><call target="conditional-compile" />
-      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-compile" />
       <call target="set-mono-2.0-framework-configuration" /><call target="conditional-compile" />
-      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-compile" />
       <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile" />
     </if>
   </target>
@@ -453,25 +411,19 @@
   <target name="install-all" depends="release-init" description="Install all build configurations for all runtime configurations">
     <echo message="Installing all build configurations for all runtime configurations." />
     <call target="set-debug-configuration" />
-    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-install" />
     <call target="set-net-1.1-framework-configuration"  /><call target="conditional-install" />
     <call target="set-net-2.0-framework-configuration"  /><call target="conditional-install" />
     <call target="set-net-3.5-framework-configuration"  /><call target="conditional-install" />
-    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-install" />
     <call target="set-mono-2.0-framework-configuration" /><call target="conditional-install" />
-    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-install" />
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-install" />
 
     <!-- we can only do a release skip if the Key file is available -->
     <if test="${not build.skip.release}">
       <call target="set-release-configuration" />
-      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-install" />
       <call target="set-net-1.1-framework-configuration"  /><call target="conditional-install" />
       <call target="set-net-2.0-framework-configuration"  /><call target="conditional-install" />
       <call target="set-net-3.5-framework-configuration"  /><call target="conditional-install" />
-      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-install" />
       <call target="set-mono-2.0-framework-configuration" /><call target="conditional-install" />
-      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-install" />
       <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-install" />
     </if>
   </target>
@@ -505,25 +457,19 @@
     <echo message="Deploying all build configurations for all runtime configurations." />
 
     <call target="set-debug-configuration" />
-    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-deploy" />
     <call target="set-net-1.1-framework-configuration"  /><call target="conditional-deploy" />
     <call target="set-net-2.0-framework-configuration"  /><call target="conditional-deploy" />
     <call target="set-net-3.5-framework-configuration"  /><call target="conditional-deploy" />
-    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-deploy" />
     <call target="set-mono-2.0-framework-configuration" /><call target="conditional-deploy" />
-    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-deploy" />
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-deploy" />
 
     <!-- we can only do a release skip if the Key file is available -->
     <if test="${not build.skip.release}">
       <call target="set-release-configuration" />
-      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-deploy" />
       <call target="set-net-1.1-framework-configuration"  /><call target="conditional-deploy" />
       <call target="set-net-2.0-framework-configuration"  /><call target="conditional-deploy" />
       <call target="set-net-3.5-framework-configuration"  /><call target="conditional-deploy" />
-      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-deploy" />
       <call target="set-mono-2.0-framework-configuration" /><call target="conditional-deploy" />
-      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-deploy" />
       <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-deploy" />
     </if>
   </target>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build Fri Aug  8 11:17:25 2008
@@ -34,7 +34,7 @@
            value="Apache NMS for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for ActiveMQ"/>
 
   <!-- Repository organized as: organization/module/version/plaform/artifact, platform might be something like 'all' or 'net-2.0/release' -->
-  <property name="nunit.dll" value="org.nunit/nunit/2.2.8/all/nunit.framework.dll"/>
+  <property name="nunit.dll" value="${basedir}/vendor/Apache.NMS/lib/nunit.framework.dll"/>
   <property name="Apache.NMS.dll" value="${basedir}/vendor/Apache.NMS/build/${current.build.framework}/${current.build.config}/Apache.NMS.dll" dynamic="true"/>
   <property name="Apache.NMS.pdb" value="${basedir}/vendor/Apache.NMS/build/${current.build.framework}/${current.build.config}/Apache.NMS.pdb" dynamic="true"/>
   <property name="Apache.NMS.xml" value="${basedir}/vendor/Apache.NMS/build/${current.build.framework}/${current.build.config}/Apache.NMS.xml" dynamic="true"/>
@@ -43,10 +43,6 @@
   <property name="Apache.NMS.Test.xml" value="${basedir}/vendor/Apache.NMS/build/${current.build.framework}/${current.build.config}/Apache.NMS.Test.xml" dynamic="true"/>
 
   <target name="vendor-init" description="Initializes the vendor libraries.">
-    <!-- The following does a poor man's maven style dependency install to the local repo -->
-    <property name="repo.task.artifact" value="${nunit.dll}"/>
-    <call target="repo-download"/>
-
     <nant buildfile="${basedir}/vendor/Apache.NMS/nant.build"/>
   </target>
 
@@ -67,16 +63,18 @@
     <assemblyfileset failonempty="true" id="dependencies">
       <include name="mscorlib.dll" asis="true"/>
       <include name="System.dll" asis="true"/>
+      <include name="System.Xml.dll" asis="true"/>
       <include name="${Apache.NMS.dll}"/>
     </assemblyfileset>
 
     <assemblyfileset failonempty="true" id="test.dependencies">
       <include name="mscorlib.dll" asis="true"/>
       <include name="System.dll" asis="true"/>
+      <include name="System.Xml.dll" asis="true"/>
       <include name="${Apache.NMS.dll}"/>
       <include name="${Apache.NMS.Test.dll}"/>
       <include name="${build.bin.dir}/${project.name}.dll"/>
-      <include name="${nant.local.repo}/${nunit.dll}"/>
+      <include name="${nunit.dll}"/>
     </assemblyfileset>
 
     <fileset id="content.filenames">

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Fri Aug  8 11:17:25 2008
@@ -57,7 +57,7 @@
 		/// Sets the prefetch size, the maximum number of messages a broker will dispatch to consumers
 		/// until acknowledgements are received.
 		/// </summary>
-		public int PrefetchSize { get; set; }
+		public int PrefetchSize;
 
 		/// <summary>
 		/// Sets the maximum number of messages to keep around per consumer
@@ -65,41 +65,52 @@
 		/// will start to be evicted for slow consumers.
 		/// Must be > 0 to enable this feature
 		/// </summary>
-		public int MaximumPendingMessageLimit { get; set; }
+		public int MaximumPendingMessageLimit;
 
 		/// <summary>
 		/// Enables or disables whether asynchronous dispatch should be used by the broker
 		/// </summary>
-		public bool DispatchAsync { get; set; }
+		public bool DispatchAsync;
 
 		/// <summary>
 		/// Enables or disables exclusive consumers when using queues. An exclusive consumer means
 		/// only one instance of a consumer is allowed to process messages on a queue to preserve order
 		/// </summary>
-		public bool Exclusive { get; set; }
+		public bool Exclusive;
 
 		/// <summary>
 		/// Enables or disables retroactive mode for consumers; i.e. do they go back in time or not?
 		/// </summary>
-		public bool Retroactive { get; set; }
+		public bool Retroactive;
 
 		/// <summary>
 		/// Sets the default consumer priority for consumers
 		/// </summary>
-		public byte Priority { get; set; }
+		public byte Priority;
 
 		/// <summary>
 		/// This property indicates whether or not async send is enabled.
 		/// </summary>
-		public bool AsyncSend { get; set; }
-		public Connection Connection { get; private set; }
+		public bool AsyncSend;
+
+		private Connection connection;
+		public Connection Connection
+		{
+			get { return this.connection; }
+			private set { this.connection = value; }
+		}
 
 		public SessionId SessionId
 		{
 			get { return info.SessionId; }
 		}
 
-		public TransactionContext TransactionContext { get; private set; }
+		private TransactionContext transactionContext;
+		public TransactionContext TransactionContext
+		{
+			get { return this.transactionContext; }
+			private set { this.transactionContext = value; }
+		}
 
 		#region ISession Members
 
@@ -406,7 +417,12 @@
 
 		// Properties
 
-		public AcknowledgementMode AcknowledgementMode { get; private set; }
+		private AcknowledgementMode acknowledgementMode;
+		public AcknowledgementMode AcknowledgementMode
+		{
+			get { return this.acknowledgementMode; }
+			private set { this.acknowledgementMode = value; }
+		}
 
 		public bool Transacted
 		{

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/InheritedTests.cs Fri Aug  8 11:17:25 2008
@@ -69,7 +69,7 @@
 	}
 
 	[TestFixture]
-	public class TextMessage : Apache.NMS.Test.TextMessage
+	public class TextMessage : Apache.NMS.Test.TextMessageTest
 	{
 	}
 

Added: activemq/activemq-dotnet/Apache.NMS/trunk/lib/nunit.framework.dll
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/lib/nunit.framework.dll?rev=684033&view=auto
==============================================================================
Binary file - no diff available.

Propchange: activemq/activemq-dotnet/Apache.NMS/trunk/lib/nunit.framework.dll
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml Fri Aug  8 11:17:25 2008
@@ -198,18 +198,6 @@
     <property name="csc.optimize"                 value="true" />
   </target>
 
-  <target name="set-net-1.0-framework-configuration">
-    <property name="current.build.framework" value="net-1.0" />
-    <property name="current.build.framework.name" value=".NET 1.0"/>
-    <property name="current.build.defines" value="${build.defines}NET,NET_1_0" dynamic="true" />
-    <property name="current.build.framework.sign" value="true" />
-    <property name="link.sdkdoc.version" value="SDK_v1_0" />
-    <property name="link.sdkdoc.web" value="true" />
-    <if test="${framework::exists(current.build.framework)}">
-      <property name="nant.settings.currentframework" value="${current.build.framework}" />
-    </if>
-  </target>
-
   <target name="set-net-1.1-framework-configuration">
     <property name="current.build.framework" value="net-1.1" />
     <property name="current.build.framework.name" value=".NET 1.1"/>
@@ -246,18 +234,6 @@
     </if>
   </target>
 
-  <target name="set-netcf-1.0-framework-configuration">
-    <property name="current.build.framework" value="netcf-1.0" />
-    <property name="current.build.framework.name" value=".NET Compact Framework 1.0"/>
-    <property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_1_0" dynamic="true" />
-    <property name="current.build.framework.sign" value="false" />
-    <property name="link.sdkdoc.version" value="SDK_v1_1" />
-    <property name="link.sdkdoc.web" value="true" />
-    <if test="${framework::exists(current.build.framework)}">
-      <property name="nant.settings.currentframework" value="${current.build.framework}" />
-    </if>
-  </target>
-
   <target name="set-netcf-2.0-framework-configuration">
     <property name="current.build.framework" value="netcf-2.0" />
     <property name="current.build.framework.name" value=".NET Compact Framework 2.0"/>
@@ -270,18 +246,6 @@
     </if>
   </target>
 
-  <target name="set-mono-1.0-framework-configuration">
-    <property name="current.build.framework" value="mono-1.0" />
-    <property name="current.build.framework.name" value="Mono 1.0"/>
-    <property name="current.build.defines" value="${build.defines}MONO,MONO_1_0" dynamic="true" />
-    <property name="current.build.framework.sign" value="true" />
-    <property name="link.sdkdoc.version" value="SDK_v1_1" />
-    <property name="link.sdkdoc.web" value="true" />
-    <if test="${framework::exists(current.build.framework)}">
-      <property name="nant.settings.currentframework" value="${current.build.framework}" />
-    </if>
-  </target>
-
   <target name="set-mono-2.0-framework-configuration">
     <property name="current.build.framework" value="mono-2.0" />
     <property name="current.build.framework.name" value="Mono 2.0"/>
@@ -300,25 +264,19 @@
   <target name="compile-all" depends="release-init" description="Compile all build configurations for all runtime configurations">
     <echo message="Compiling all build configurations for all runtime configurations." />
     <call target="set-debug-configuration" />
-    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-compile" />
     <call target="set-net-1.1-framework-configuration"  /><call target="conditional-compile" />
     <call target="set-net-2.0-framework-configuration"  /><call target="conditional-compile" />
     <call target="set-net-3.5-framework-configuration"  /><call target="conditional-compile" />
-    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-compile" />
     <call target="set-mono-2.0-framework-configuration" /><call target="conditional-compile" />
-    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-compile" />
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile" />
 
     <!-- we can only do a release skip if the Key file is available -->
     <if test="${not build.skip.release}">
       <call target="set-release-configuration" />
-      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-compile" />
       <call target="set-net-1.1-framework-configuration"  /><call target="conditional-compile" />
       <call target="set-net-2.0-framework-configuration"  /><call target="conditional-compile" />
       <call target="set-net-3.5-framework-configuration"  /><call target="conditional-compile" />
-      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-compile" />
       <call target="set-mono-2.0-framework-configuration" /><call target="conditional-compile" />
-      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-compile" />
       <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-compile" />
     </if>
   </target>
@@ -453,25 +411,19 @@
   <target name="install-all" depends="release-init" description="Install all build configurations for all runtime configurations">
     <echo message="Installing all build configurations for all runtime configurations." />
     <call target="set-debug-configuration" />
-    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-install" />
     <call target="set-net-1.1-framework-configuration"  /><call target="conditional-install" />
     <call target="set-net-2.0-framework-configuration"  /><call target="conditional-install" />
     <call target="set-net-3.5-framework-configuration"  /><call target="conditional-install" />
-    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-install" />
     <call target="set-mono-2.0-framework-configuration" /><call target="conditional-install" />
-    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-install" />
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-install" />
 
     <!-- we can only do a release skip if the Key file is available -->
     <if test="${not build.skip.release}">
       <call target="set-release-configuration" />
-      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-install" />
       <call target="set-net-1.1-framework-configuration"  /><call target="conditional-install" />
       <call target="set-net-2.0-framework-configuration"  /><call target="conditional-install" />
       <call target="set-net-3.5-framework-configuration"  /><call target="conditional-install" />
-      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-install" />
       <call target="set-mono-2.0-framework-configuration" /><call target="conditional-install" />
-      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-install" />
       <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-install" />
     </if>
   </target>
@@ -505,25 +457,19 @@
     <echo message="Deploying all build configurations for all runtime configurations." />
 
     <call target="set-debug-configuration" />
-    <call target="set-net-1.0-framework-configuration"  /><call target="conditional-deploy" />
     <call target="set-net-1.1-framework-configuration"  /><call target="conditional-deploy" />
     <call target="set-net-2.0-framework-configuration"  /><call target="conditional-deploy" />
     <call target="set-net-3.5-framework-configuration"  /><call target="conditional-deploy" />
-    <call target="set-mono-1.0-framework-configuration" /><call target="conditional-deploy" />
     <call target="set-mono-2.0-framework-configuration" /><call target="conditional-deploy" />
-    <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-deploy" />
     <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-deploy" />
 
     <!-- we can only do a release skip if the Key file is available -->
     <if test="${not build.skip.release}">
       <call target="set-release-configuration" />
-      <call target="set-net-1.0-framework-configuration"  /><call target="conditional-deploy" />
       <call target="set-net-1.1-framework-configuration"  /><call target="conditional-deploy" />
       <call target="set-net-2.0-framework-configuration"  /><call target="conditional-deploy" />
       <call target="set-net-3.5-framework-configuration"  /><call target="conditional-deploy" />
-      <call target="set-mono-1.0-framework-configuration" /><call target="conditional-deploy" />
       <call target="set-mono-2.0-framework-configuration" /><call target="conditional-deploy" />
-      <call target="set-netcf-1.0-framework-configuration"/><call target="conditional-deploy" />
       <call target="set-netcf-2.0-framework-configuration"/><call target="conditional-deploy" />
     </if>
   </target>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant.build?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant.build Fri Aug  8 11:17:25 2008
@@ -34,14 +34,7 @@
            value="Apache NMS (.Net Messaging Library): An abstract interface to Message Oriented Middleware (MOM) providers"/>
   <property name="project.cls.compliant" value="true"/>
 
-  <!-- Repository organized as: organization/module/version/plaform/artifact, platform might be something like 'all' or 'net-2.0/release' -->
-  <property name="nunit.dll" value="org.nunit/nunit/2.2.8/all/nunit.framework.dll"/>
-
-  <target name="vendor-init" description="Initializes the vendor libraries.">
-    <!-- The following does a poor man's maven style dependency install to the local repo -->
-    <property name="repo.task.artifact" value="${nunit.dll}"/>
-    <call target="repo-download"/>
-  </target>
+  <property name="nunit.dll" value="${basedir}/lib/nunit.framework.dll"/>
 
   <target name="dependency-init" description="Initializes build dependencies">
 
@@ -54,8 +47,9 @@
     <assemblyfileset failonempty="true" id="test.dependencies">
       <include name="mscorlib.dll" asis="true"/>
       <include name="System.dll" asis="true"/>
+      <include name="System.Xml.dll" asis="true"/>
       <include name="${build.bin.dir}/${project.name}.dll"/>
-      <include name="${nant.local.repo}/${nunit.dll}"/>
+      <include name="${nunit.dll}"/>
     </assemblyfileset>
 
     <fileset id="content.filenames">

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs Fri Aug  8 11:17:25 2008
@@ -14,135 +14,217 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-using System;
+
 using System.Threading;
+using Apache.NMS.Util;
 using NUnit.Framework;
 
 namespace Apache.NMS.Test
 {
-    [TestFixture]
-    public abstract class AsyncConsumeTest : NMSTestSupport
-    {
-        protected Object semaphore = new Object();
-        protected bool received;
-
-
-        [SetUp]
-        public override void SetUp()
-        {
-            base.SetUp();
-        }
-
-        [TearDown]
-        public override void TearDown()
-        {
-            base.TearDown();
-        }
-
-        [Test]
-        public void TestAsynchronousConsume()
-        {
-            // START SNIPPET: demo
-            IMessageConsumer consumer = Session.CreateConsumer(Destination);
-            consumer.Listener += new MessageListener(OnMessage);
-            // END SNIPPET: demo
-
-            // now lets send a message
-            IMessageProducer producer = CreateProducer();
-            IMessage request = CreateMessage();
-            request.NMSCorrelationID = "abc";
-            request.NMSType = "Test";
-            producer.Send(request);
-
-            WaitForMessageToArrive();
-        }
-
-        [Test]
-        public void TestCreateConsumerAfterSend()
-        {
-            // now lets send a message
-            IMessageProducer producer = CreateProducer();
-            IMessage request = CreateMessage();
-            request.NMSCorrelationID = "abc";
-            request.NMSType = "Test";
-            producer.Send(request);
-
-            // lets create an async consumer
-            IMessageConsumer consumer = Session.CreateConsumer(Destination);
-            consumer.Listener += new MessageListener(OnMessage);
-
-            WaitForMessageToArrive();
-        }
-
-        [Test]
-        public void TestCreateConsumerBeforeSendButAddListenerAfterSend()
-        {
-            // lets create an async consumer
-            IMessageConsumer consumer = Session.CreateConsumer(Destination);
-
-            // now lets send a message
-            IMessageProducer producer = CreateProducer();
-            IMessage request = CreateMessage();
-            request.NMSCorrelationID = "abc";
-            request.NMSType = "Test";
-            producer.Send(request);
-
-            // now lets add the listener
-            consumer.Listener += new MessageListener(OnMessage);
-
-            WaitForMessageToArrive();
-        }
-
-        [Test]
-        public void TextMessageSRExample()
-        {
-            using (IConnection connection = Factory.CreateConnection())
-            {
-                AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
-                ISession session = connection.CreateSession(acknowledgementMode);
-
-                IDestination destination = session.GetQueue("FOO.BAR");
-
-                // lets create a consumer and producer
-                IMessageConsumer consumer = session.CreateConsumer(destination);
-                consumer.Listener += new MessageListener(OnMessage);
-
-                IMessageProducer producer = session.CreateProducer(destination);
-                producer.Persistent = true;
-
-                // lets send a message
-                ITextMessage request = session.CreateTextMessage(
-                    "HelloWorld!");
-                request.NMSCorrelationID = "abc";
-                request.Properties["NMSXGroupID"] = "cheese";
-                request.Properties["myHeader"] = "James";
-
-                producer.Send(request);
-
-                WaitForMessageToArrive();
-            }
-        }
-
-        protected void OnMessage(IMessage message)
-        {
-            Console.WriteLine("Received message: " + message);
-            lock (semaphore)
-            {
-                received = true;
-                Monitor.PulseAll(semaphore);
-            }
-        }
-
-        protected void WaitForMessageToArrive()
-        {
-            lock (semaphore)
-            {
-                if (!received)
-                {
-                    Monitor.Wait(semaphore, receiveTimeout);
-                }
-                Assert.AreEqual(true, received, "Should have received a message by now!");
-            }
-        }
-    }
-}
\ No newline at end of file
+	[TestFixture]
+	public abstract class AsyncConsumeTest : NMSTestSupport
+	{
+		protected static string DESTINATION_NAME = "AsyncConsumeDestination";
+		protected static string TEST_CLIENT_ID = "AsyncConsumeClientId";
+		protected object semaphore = new object();
+		protected bool received;
+		protected IMessage receivedMsg;
+
+		[SetUp]
+		public override void SetUp()
+		{
+			base.SetUp();
+			received = false;
+			receivedMsg = null;
+		}
+
+		[Test]
+		public void TestAsynchronousConsume()
+		{
+			doTestAsynchronousConsume(false);
+		}
+
+		[Test]
+		public void TestAsynchronousConsumePersistent()
+		{
+			doTestAsynchronousConsume(true);
+		}
+
+		protected void doTestAsynchronousConsume(bool persistent)
+		{
+			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+				{
+					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					using(IMessageConsumer consumer = session.CreateConsumer(destination, receiveTimeout))
+					using(IMessageProducer producer = session.CreateProducer(destination, receiveTimeout))
+					{
+						producer.Persistent = persistent;
+						producer.RequestTimeout = receiveTimeout;
+						consumer.Listener += new MessageListener(OnMessage);
+
+						IMessage request = session.CreateMessage();
+						request.NMSCorrelationID = "AsyncConsume";
+						request.NMSType = "Test";
+						producer.Send(request);
+
+						WaitForMessageToArrive();
+						Assert.AreEqual(request.NMSCorrelationID, receivedMsg.NMSCorrelationID, "Invalid correlation ID.");
+					}
+				}
+			}
+		}
+
+		[Test]
+		public void TestCreateConsumerAfterSend()
+		{
+			doTestCreateConsumerAfterSend(false);
+		}
+
+		[Test]
+		public void TestCreateConsumerAfterSendPersistent()
+		{
+			doTestCreateConsumerAfterSend(true);
+		}
+
+		protected void doTestCreateConsumerAfterSend(bool persistent)
+		{
+			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+				{
+					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					using(IMessageProducer producer = session.CreateProducer(destination, receiveTimeout))
+					{
+						producer.Persistent = false;
+						producer.RequestTimeout = receiveTimeout;
+
+						IMessage request = session.CreateMessage();
+						request.NMSCorrelationID = "AsyncConsumeAfterSend";
+						request.NMSType = "Test";
+						producer.Send(request);
+
+						using(IMessageConsumer consumer = session.CreateConsumer(destination, receiveTimeout))
+						{
+							consumer.Listener += new MessageListener(OnMessage);
+							WaitForMessageToArrive();
+							Assert.AreEqual(request.NMSCorrelationID, receivedMsg.NMSCorrelationID, "Invalid correlation ID.");
+						}
+					}
+				}
+			}
+		}
+
+		[Test]
+		public void TestCreateConsumerBeforeSendAddListenerAfterSend()
+		{
+			doTestCreateConsumerBeforeSendAddListenerAfterSend(false);
+		}
+
+		[Test]
+		public void TestCreateConsumerBeforeSendAddListenerAfterSendPersistent()
+		{
+			doTestCreateConsumerBeforeSendAddListenerAfterSend(true);
+		}
+
+		public void doTestCreateConsumerBeforeSendAddListenerAfterSend(bool persistent)
+		{
+			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+				{
+					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					using(IMessageConsumer consumer = session.CreateConsumer(destination, receiveTimeout))
+					using(IMessageProducer producer = session.CreateProducer(destination, receiveTimeout))
+					{
+						producer.Persistent = persistent;
+						producer.RequestTimeout = receiveTimeout;
+
+						IMessage request = session.CreateMessage();
+						request.NMSCorrelationID = "AsyncConsumeAfterSendLateListener";
+						request.NMSType = "Test";
+						producer.Send(request);
+
+						// now lets add the listener
+						consumer.Listener += new MessageListener(OnMessage);
+						WaitForMessageToArrive();
+						Assert.AreEqual(request.NMSCorrelationID, receivedMsg.NMSCorrelationID, "Invalid correlation ID.");
+					}
+				}
+			}
+		}
+
+		[Test]
+		public void TestAsynchronousTextMessageConsume()
+		{
+			doTestAsynchronousTextMessageConsume(false);
+		}
+
+		[Test]
+		public void TestAsynchronousTextMessageConsumePersistent()
+		{
+			doTestAsynchronousTextMessageConsume(true);
+		}
+
+		public void doTestAsynchronousTextMessageConsume(bool persistent)
+		{
+			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+				{
+					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					using(IMessageConsumer consumer = session.CreateConsumer(destination, receiveTimeout))
+					{
+						consumer.Listener += new MessageListener(OnMessage);
+						using(IMessageProducer producer = session.CreateProducer(destination, receiveTimeout))
+						{
+							producer.Persistent = persistent;
+							producer.RequestTimeout = receiveTimeout;
+
+							ITextMessage request = session.CreateTextMessage("Hello, World!");
+							request.NMSCorrelationID = "AsyncConsumeTextMessage";
+							request.Properties["NMSXGroupID"] = "cheese";
+							request.Properties["myHeader"] = "James";
+
+							producer.Send(request);
+
+							WaitForMessageToArrive();
+							Assert.AreEqual(request.NMSCorrelationID, receivedMsg.NMSCorrelationID, "Invalid correlation ID.");
+							Assert.AreEqual(request.Properties["NMSXGroupID"], receivedMsg.Properties["NMSXGroupID"], "Invalid NMSXGroupID.");
+							Assert.AreEqual(request.Properties["myHeader"], receivedMsg.Properties["myHeader"], "Invalid myHeader.");
+							Assert.AreEqual(request.Text, ((ITextMessage) receivedMsg).Text, "Invalid text body.");
+						}
+					}
+				}
+			}
+		}
+
+		protected void OnMessage(IMessage message)
+		{
+			lock(semaphore)
+			{
+				receivedMsg = message;
+				received = true;
+				Monitor.PulseAll(semaphore);
+			}
+		}
+
+		protected void WaitForMessageToArrive()
+		{
+			lock(semaphore)
+			{
+				if(!received)
+				{
+					Monitor.Wait(semaphore, receiveTimeout);
+				}
+			}
+
+			Assert.IsTrue(received, "Should have received a message by now!");
+		}
+	}
+}

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/BytesMessageTest.cs Fri Aug  8 11:17:25 2008
@@ -14,50 +14,67 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-using System;
+
+using Apache.NMS.Util;
 using NUnit.Framework;
 
 namespace Apache.NMS.Test
 {
-    [TestFixture]
-    public abstract class BytesMessageTest : NMSTestSupport
-    {
-        private byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8};
-
-        [SetUp]
-        public override void SetUp()
-        {
-            base.SetUp();
-        }
-
-        [TearDown]
-        public override void TearDown()
-        {
-            base.TearDown();
-        }
-
-        [Test]
-        public override void SendAndSyncReceive()
-        {
-            base.SendAndSyncReceive();
-        }
-
-        protected override IMessage CreateMessage()
-        {
-            IBytesMessage request = Session.CreateBytesMessage(expected);
-            return request;
-        }
-
-        protected override void AssertValidMessage(IMessage message)
-        {
-            Assert.IsTrue(message is IBytesMessage, "Did not receive a IBytesMessage: " + message);
-
-            Console.WriteLine("Received IBytesMessage: " + message);
-
-            IBytesMessage bytesMessage = (IBytesMessage) message;
-            byte[] actual = bytesMessage.Content;
-            Console.WriteLine("Received message with content: " + actual);
-            Assert.AreEqual(expected, actual, "the message content");
-        }
-    }
-}
\ No newline at end of file
+	[TestFixture]
+	public abstract class BytesMessageTest : NMSTestSupport
+	{
+		protected static string DESTINATION_NAME = "BytesMessageDestination";
+		protected static string TEST_CLIENT_ID = "BytesMessageClientId";
+		protected byte[] msgContent = {1, 2, 3, 4, 5, 6, 7, 8};
+		
+		[Test]
+		public void SendReceiveBytesMessage()
+		{
+			doSendReceiveBytesMessage(false);
+		}
+
+		[Test]
+		public void SendReceiveBytesMessagePersistent()
+		{
+			doSendReceiveBytesMessage(true);
+		}
+
+		protected void doSendReceiveBytesMessage(bool persistent)
+		{
+			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			{
+				connection.Start();
+				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
+				{
+					IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
+					using(IMessageConsumer consumer = session.CreateConsumer(destination, receiveTimeout))
+					using(IMessageProducer producer = session.CreateProducer(destination, receiveTimeout))
+					{
+						producer.Persistent = persistent;
+						producer.RequestTimeout = receiveTimeout;
+						IMessage request = session.CreateBytesMessage(msgContent);
+						producer.Send(request);
+
+						IMessage message = consumer.Receive(receiveTimeout);
+						AssertBytesMessageEqual(request, message);
+						Assert.AreEqual(persistent, message.NMSPersistent, "NMSPersistent does not match");
+					}
+				}
+			}
+		}
+
+		/// <summary>
+		/// Assert that two messages are IBytesMessages and their contents are equal.
+		/// </summary>
+		/// <param name="expected"></param>
+		/// <param name="actual"></param>
+		protected void AssertBytesMessageEqual(IMessage expected, IMessage actual)
+		{
+			IBytesMessage expectedBytesMsg = expected as IBytesMessage;
+			Assert.IsNotNull(expectedBytesMsg, "'expected' message not a bytes message");
+			IBytesMessage actualBytesMsg = actual as IBytesMessage;
+			Assert.IsNotNull(actualBytesMsg, "'actual' message not a bytes message");
+			Assert.AreEqual(expectedBytesMsg.Content, actualBytesMsg.Content, "Bytes message contents do not match.");
+		}
+	}
+}

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs Fri Aug  8 11:17:25 2008
@@ -44,9 +44,9 @@
 		private IDestination destination;
 
 		protected TimeSpan receiveTimeout = TimeSpan.FromMilliseconds(5000);
-		protected virtual string clientId { get; set; }
-		protected virtual string passWord { get; set; }
-		protected virtual string userName { get; set; }
+		protected string clientId;
+		protected string passWord;
+		protected string userName;
 		[Obsolete]
 		protected bool persistent = true;
 		[Obsolete]

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs?rev=684033&r1=684032&r2=684033&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs Fri Aug  8 11:17:25 2008
@@ -21,15 +21,15 @@
 
 namespace Apache.NMS.Test
 {
-    [TestFixture]
-    public abstract class TextMessage : NMSTestSupport
-    {
+	[TestFixture]
+	public abstract class TextMessageTest : NMSTestSupport
+	{
 		protected static string DESTINATION_NAME = "TextMessageDestination";
 		protected static string TEST_CLIENT_ID = "TextMessageClientId";
 		
-        [Test]
-        public void SendReceiveTextMessage()
-        {
+		[Test]
+		public void SendReceiveTextMessage()
+		{
 			doSendReceiveTextMessage(false);
 		}
 
@@ -56,26 +56,25 @@
 						producer.Send(request);
 
 						IMessage message = consumer.Receive(receiveTimeout);
-						AssertTextMessageEqual(request, message, "Text message does not match.");
+						AssertTextMessageEqual(request, message);
 						Assert.AreEqual(persistent, message.NMSPersistent, "NMSPersistent does not match");
 					}
 				}
 			}
-        }
+		}
 
 		/// <summary>
 		/// Assert that two messages are ITextMessages and their text bodies are equal.
 		/// </summary>
 		/// <param name="expected"></param>
 		/// <param name="actual"></param>
-		/// <param name="message"></param>
-		protected void AssertTextMessageEqual(IMessage expected, IMessage actual, String message)
+		protected void AssertTextMessageEqual(IMessage expected, IMessage actual)
 		{
 			ITextMessage expectedTextMsg = expected as ITextMessage;
 			Assert.IsNotNull(expectedTextMsg, "'expected' message not a text message");
 			ITextMessage actualTextMsg = actual as ITextMessage;
 			Assert.IsNotNull(actualTextMsg, "'actual' message not a text message");
-			Assert.AreEqual(expectedTextMsg.Text, actualTextMsg.Text, message);
+			Assert.AreEqual(expectedTextMsg.Text, actualTextMsg.Text, "Text message does not match.");
 		}
 	}
-}
\ No newline at end of file
+}



Mime
View raw message