Missed a few in the refactor

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384453 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-09 07:15:58 +00:00
parent c40f989966
commit 8bbca4d6cb
17 changed files with 108 additions and 93 deletions

View File

@ -206,15 +206,15 @@
<Compile Include="src\test\csharp\ActiveMQ\OpenWire\EndianTest.cs"/>
<Compile Include="src\test\csharp\ActiveMQ\TestMain.cs"/>
<Compile Include="src\test\csharp\CommonAssemblyInfo.cs"/>
<Compile Include="src\test\csharp\JMS\AsyncConsumeTest.cs"/>
<Compile Include="src\test\csharp\JMS\BadConsumeTest.cs"/>
<Compile Include="src\test\csharp\JMS\BytesMessageTest.cs"/>
<Compile Include="src\test\csharp\JMS\ConsumerTest.cs"/>
<Compile Include="src\test\csharp\JMS\JMSPropertyTest.cs"/>
<Compile Include="src\test\csharp\JMS\JMSTestSupport.cs"/>
<Compile Include="src\test\csharp\JMS\MapMessageTest.cs"/>
<Compile Include="src\test\csharp\JMS\MessageTest.cs"/>
<Compile Include="src\test\csharp\JMS\TextMessage.cs"/>
<Compile Include="src\test\csharp\JMS\TransactionTest.cs"/>
<Compile Include="src\test\csharp\NMS\AsyncConsumeTest.cs"/>
<Compile Include="src\test\csharp\NMS\BadConsumeTest.cs"/>
<Compile Include="src\test\csharp\NMS\BytesMessageTest.cs"/>
<Compile Include="src\test\csharp\NMS\ConsumerTest.cs"/>
<Compile Include="src\test\csharp\NMS\JMSPropertyTest.cs"/>
<Compile Include="src\test\csharp\NMS\JMSTestSupport.cs"/>
<Compile Include="src\test\csharp\NMS\MapMessageTest.cs"/>
<Compile Include="src\test\csharp\NMS\MessageTest.cs"/>
<Compile Include="src\test\csharp\NMS\TextMessage.cs"/>
<Compile Include="src\test\csharp\NMS\TransactionTest.cs"/>
</ItemGroup>
</Project>

View File

@ -1,56 +1,55 @@
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* 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.
*/
using System;
using System.Collections;
using ActiveMQ.OpenWire;
using ActiveMQ.Commands;
using JMS;
namespace ActiveMQ.Commands
{
//
// Marshalling code for Open Wire Format for ActiveMQObjectMessage
//
//
// NOTE!: This file is autogenerated - do not modify!
// if you need to make a change, please see the Groovy scripts in the
// activemq-core module
//
public class ActiveMQObjectMessage : ActiveMQMessage
{
public const byte ID_ActiveMQObjectMessage = 26;
public override string ToString() {
return GetType().Name + "["
+ " ]";
}
public override byte GetDataStructureType() {
return ID_ActiveMQObjectMessage;
}
// Properties
}
}
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* 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.
*/
using System;
using System.Collections;
using ActiveMQ.OpenWire;
using ActiveMQ.Commands;
namespace ActiveMQ.Commands
{
//
// Marshalling code for Open Wire Format for ActiveMQObjectMessage
//
//
// NOTE!: This file is autogenerated - do not modify!
// if you need to make a change, please see the Groovy scripts in the
// activemq-core module
//
public class ActiveMQObjectMessage : ActiveMQMessage
{
public const byte ID_ActiveMQObjectMessage = 26;
public override string ToString() {
return GetType().Name + "["
+ " ]";
}
public override byte GetDataStructureType() {
return ID_ActiveMQObjectMessage;
}
// Properties
}
}

View File

@ -16,7 +16,6 @@
*/
using ActiveMQ.Commands;
using ActiveMQ.Transport;
using JMS;
using System;
namespace ActiveMQ.Transport

View File

@ -16,7 +16,6 @@
*/
using ActiveMQ.Commands;
using ActiveMQ.Transport;
using JMS;
using System;
namespace ActiveMQ.Transport

View File

@ -20,7 +20,6 @@ using System.Collections;
using ActiveMQ.Commands;
using ActiveMQ.Transport;
using JMS;
namespace ActiveMQ.Transport
{

View File

@ -16,7 +16,6 @@
*/
using ActiveMQ.Commands;
using ActiveMQ.Transport;
using JMS;
using System;
namespace ActiveMQ.Transport

View File

@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using JMS;
using NUnit.Framework;
using System;
using System.IO;

View File

@ -20,7 +20,8 @@ using System;
using System.Threading;
namespace JMS
namespace NMS
{
[TestFixture]
public class AsyncConsumeTest : JMSTestSupport
@ -43,7 +44,7 @@ namespace JMS
[Test]
public void TestAsynchronousConsume()
{
// lets create an async consumer
// START SNIPPET: demo
IMessageConsumer consumer = session.CreateConsumer(this.Destination);
@ -87,3 +88,4 @@ namespace JMS
}
}

View File

@ -19,7 +19,8 @@ using NUnit.Framework;
using System;
namespace JMS
namespace NMS
{
[TestFixture]
public class BadConsumeTest : JMSTestSupport
@ -54,3 +55,4 @@ namespace JMS
}
}

View File

@ -19,7 +19,8 @@ using NUnit.Framework;
using System;
namespace JMS
namespace NMS
{
[ TestFixture ]
public class BytesMessageTest : JMSTestSupport
@ -66,3 +67,4 @@ namespace JMS
}

View File

@ -18,7 +18,8 @@ using NMS;
using NUnit.Framework;
namespace JMS
namespace NMS
{
[TestFixture]
public class ConsumerTest : JMSTestSupport
@ -62,7 +63,7 @@ namespace JMS
message.Properties["color"] = "red";
producer.Send(message);
IMessage m = consumer.Receive(receiveTimeout );
IMessage m = consumer.Receive(receiveTimeout);
Assert.IsNotNull(m);
Assert.AreEqual("1st", ((ITextMessage)m).Text);
@ -89,3 +90,4 @@ namespace JMS
}

View File

@ -20,7 +20,8 @@ using NUnit.Framework;
using System;
namespace JMS
namespace NMS
{
[ TestFixture ]
public class JMSPropertyTest : JMSTestSupport
@ -136,3 +137,4 @@ namespace JMS
}

View File

@ -21,7 +21,8 @@ using System;
/// <summary>
/// useful base class for test cases
/// </summary>
namespace JMS
namespace NMS
{
[ TestFixture ]
public abstract class JMSTestSupport
@ -59,7 +60,7 @@ namespace JMS
Assert.IsNotNull(connection != null, "no session created");
Console.WriteLine("Connected.");
}
virtual protected void Disconnect()
{
@ -88,7 +89,7 @@ namespace JMS
// Should only need to wait for first message to arrive due to the way
// prefetching works.
IMessage msg = consumer.Receive(receiveTimeout);
while (msg!= null)
while (msg != null)
{
msg = consumer.ReceiveNoWait();
}
@ -105,14 +106,15 @@ namespace JMS
IMessage request = CreateMessage();
producer.Send(request);
IMessage message = consumer.Receive(receiveTimeout);
Assert.IsNotNull(message, "No message returned!");
AssertValidMessage(message);
}
}
protected virtual IConnectionFactory CreateConnectionFactory() {
protected virtual IConnectionFactory CreateConnectionFactory()
{
return new ActiveMQ.ConnectionFactory(new Uri("tcp://localhost:61616"));
}
@ -126,7 +128,7 @@ namespace JMS
IMessageProducer producer = session.CreateProducer(destination);
return producer;
}
protected virtual IMessageConsumer CreateConsumer()
{
IMessageConsumer consumer = session.CreateConsumer(destination);
@ -157,7 +159,8 @@ namespace JMS
public IDestination Destination
{
get {
if( destination == null ) {
if (destination == null)
{
destination = CreateDestination();
Assert.IsNotNull(destination, "No destination available!");
Console.WriteLine("Using destination: " + destination);
@ -172,3 +175,4 @@ namespace JMS
}
}

View File

@ -19,7 +19,8 @@ using NUnit.Framework;
using System;
namespace JMS
namespace NMS
{
[ TestFixture ]
public class MapMessageTest : JMSTestSupport
@ -112,7 +113,7 @@ namespace JMS
Assert.AreEqual(j, mapMessage.Body.GetShort("j"), "map entry: j");
Assert.AreEqual(k, mapMessage.Body.GetInt("k"), "map entry: k");
Assert.AreEqual(l, mapMessage.Body.GetLong("l"), "map entry: l");
}
protected string ToHex(long value)
@ -122,3 +123,4 @@ namespace JMS
}
}

View File

@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using JMS;
using NMS;
using NUnit.Framework;
using System;
namespace tests
namespace NMS
{
[ TestFixture ]
public class MessageTest : JMSTestSupport
@ -119,3 +119,4 @@ namespace tests
}
}

View File

@ -19,7 +19,8 @@ using NUnit.Framework;
using System;
namespace JMS
namespace NMS
{
[ TestFixture ]
public class TextMessage : JMSTestSupport
@ -62,3 +63,4 @@ namespace JMS
}

View File

@ -19,7 +19,8 @@ using NUnit.Framework;
using System;
using System.Collections;
namespace JMS
namespace NMS
{
[TestFixture]
public class TransactionTest : JMSTestSupport
@ -43,7 +44,7 @@ namespace JMS
base.TearDown();
}
[Test]
public void TestSendRollback()
{
@ -249,3 +250,4 @@ namespace JMS
}
}