activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r368050 - in /incubator/activemq/trunk/openwire-dotnet: src/OpenWire.Client/ src/OpenWire.Client/Core/ tests/OpenWire.Client/
Date Wed, 11 Jan 2006 16:08:07 GMT
Author: jstrachan
Date: Wed Jan 11 08:07:52 2006
New Revision: 368050

URL: http://svn.apache.org/viewcvs?rev=368050&view=rev
Log:
refactored Transport -> ITransport along with adding a stub working NUnit test case and
build

Added:
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ITransport.cs
      - copied, changed from r368000, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs
Removed:
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs
Modified:
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ConnectionFactory.cs
    incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/ClientTest.cs
    incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs?rev=368050&r1=368049&r2=368050&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs Wed Jan 11
08:07:52 2006
@@ -10,7 +10,7 @@
         public class Connection : IConnection {
 
                 private ConnectionInfo info;
-                private Transport transport;
+                private ITransport transport;
                 IList sessions = new ArrayList();
                 private bool transacted;
                 private bool connected;
@@ -18,7 +18,7 @@
                 private AcknowledgementMode acknowledgementMode;
                 private long sessionCounter;
 
-                public Connection(Transport transport, ConnectionInfo info) {
+                public Connection(ITransport transport, ConnectionInfo info) {
                         this.transport = transport;
                         this.info = info; 
                 }
@@ -52,7 +52,7 @@
 
                 // Properties
 
-                public Transport Transport {
+                public ITransport ITransport {
                         get { return transport; }
                         set { this.transport = value; } 
                 }
@@ -84,7 +84,7 @@
                 /// </summary>
                 public Response SyncRequest(Command command) {
                         CheckConnected();
-                        Response response = Transport.Request(command);
+                        Response response = ITransport.Request(command);
                         if (response is ExceptionResponse) {
                                 ExceptionResponse exceptionResponse = (ExceptionResponse)
response;
                                 // TODO include stack trace

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ConnectionFactory.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ConnectionFactory.cs?rev=368050&r1=368049&r2=368050&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ConnectionFactory.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ConnectionFactory.cs Wed
Jan 11 08:07:52 2006
@@ -28,7 +28,7 @@
 
                 public IConnection CreateConnection(string userName, string password) {
                         ConnectionInfo info = CreateConnectionInfo(userName, password);
-                        Transport transport = CreateTransport();
+                        ITransport transport = CreateITransport();
                         Connection connection = new Connection(transport, info);
                         connection.ClientId = clientId;
                         return connection; 
@@ -77,7 +77,7 @@
                         return Guid.NewGuid().ToString(); 
                 }
 
-                protected Transport CreateTransport() {
+                protected ITransport CreateITransport() {
                         // TODO
                         return null; 
                 } 

Copied: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ITransport.cs (from
r368000, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ITransport.cs?p2=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ITransport.cs&p1=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs&r1=368000&r2=368050&rev=368050&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ITransport.cs Wed Jan
11 08:07:52 2006
@@ -6,13 +6,13 @@
 
 namespace OpenWire.Client.Core {
         
-        public delegate void CommandHandler(Transport sender, Command command);
-        public delegate void ExceptionHandler(Transport sender, Exception command);
+        public delegate void CommandHandler(ITransport sender, Command command);
+        public delegate void ExceptionHandler(ITransport sender, Exception command);
 
         /// <summary>
         /// Represents the logical networking transport layer.
         /// </summary>
-        public interface Transport {
+        public interface ITransport {
                 void Oneway(Command command);
 
                 FutureResponse AsyncRequest(Command command);

Modified: incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/ClientTest.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/ClientTest.cs?rev=368050&r1=368049&r2=368050&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/ClientTest.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/ClientTest.cs Wed Jan 11
08:07:52 2006
@@ -14,6 +14,10 @@
                 public void SendAndSyncReceive() {
                         IConnectionFactory factory = new ConnectionFactory("localhost", 61616);
                         
+                        Assert.IsTrue(factory != null, "created valid factory: " + factory);
+                        
+                        Console.WriteLine("Worked!");
+                        /*
                         using (IConnection connection = factory.CreateConnection()) {
                                 ISession session = connection.CreateSession();
                                 IDestination destination = session.GetQueue("FOO.BAR");
@@ -28,6 +32,7 @@
                                 
                                 Assert.AreEqual(expected, message.Text); 
                         } 
+                        */
                 } 
         } 
 }

Modified: incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build?rev=368050&r1=368049&r2=368050&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build (original)
+++ incubator/activemq/trunk/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build Wed
Jan 11 08:07:52 2006
@@ -1,40 +1,47 @@
 <?xml version="1.0"?>
 <project name="OpenWire.Core" default="test">
-    <!--
-        Required properties:
-            * build.dir             - (path) root level to build to, assemblies will go in
${build.dir}/bin
-            * build.debug           - (true|false) debug build?
-            * current.build.defines - framework-specific build defines
-    -->
-    <target name="build">
-        <!-- build test assembly -->
-        <csc target="library" define="${current.build.defines}" warnaserror="true" debug="${build.debug}"
output="${build.dir}/bin/${project.name}.Tests.dll">
-            <nowarn>
-                <!-- do not report warnings for missing XML comments -->
-                <warning number="1591" />
-                <!-- do not report deprecation warnings -->
-                <warning number="0618" />
-            </nowarn>
-            <sources failonempty="true">
-                <include name="**/*.cs" />
-                <!-- common assembly-level attributes -->
-                <include name="../../src/CommonAssemblyInfo.cs" />
-            </sources>
-            <references>
-                <include name="${lib.framework.dir}/log4net.dll" />
-                <include name="${build.dir}/bin/openwire.dll" />
-                <include name="${lib.framework.dir}/nunit.framework.dll" />
-            </references>
-            <resources failonempty="false" basedir="Resources" dynamicprefix="true" prefix="XML:">
-                <include name="**/*.xml"/>
-            </resources>
-        </csc>
-    </target>
-    <target name="test" depends="build">
-         <nunit2>
-            <formatter type="Plain" />
-            <test assemblyname="${build.dir}/bin/${project.name}.Tests.dll" appconfig="${path::combine(nant.location,
'nant.tests.config')}">
-            </test>
-         </nunit2>
-    </target>
+  <!--
+    Required properties:
+    * build.dir             - (path) root level to build to, assemblies will go in ${build.dir}/bin
+    * build.debug           - (true|false) debug build?
+    * current.build.defines - framework-specific build defines
+  -->
+  <target name="build">
+    <!-- build test assembly -->
+    <csc target="library" define="${current.build.defines}"
+      warnaserror="true" debug="${build.debug}"
+      output="${build.dir}/bin/${project.name}.Tests.dll">
+      <nowarn>
+        <!-- do not report warnings for missing XML comments -->
+        <warning number="1591" />
+        <!-- do not report deprecation warnings -->
+        <warning number="0618" />
+      </nowarn>
+      <sources failonempty="true">
+        <include name="**/*.cs" />
+        <!-- common assembly-level attributes -->
+        <include name="../../src/CommonAssemblyInfo.cs" />
+      </sources>
+      <references defaultexcludes="true">
+        <include name="mscorlib.dll" />
+        <include name="System.dll" />
+        <include name="nunit.framework.dll" />
+        <include name="log4net.dll" />
+        <include name="${build.dir}/bin/${project.name}.dll" />
+      </references>
+
+
+      <resources failonempty="false" basedir="Resources"
+        dynamicprefix="true" prefix="XML:">
+        <include name="**/*.xml" />
+      </resources>
+    </csc>
+  </target>
+  <target name="test" depends="build">
+    <nunit2>
+      <formatter type="Plain" />
+      <test assemblyname="${build.dir}/bin/${project.name}.Tests.dll">
+      </test>
+    </nunit2>
+  </target>
 </project>



Mime
View raw message