diff options
author | Michael Barker <mike@middlesoft.co.uk> | 2009-05-20 11:40:57 +0400 |
---|---|---|
committer | Michael Barker <mike@middlesoft.co.uk> | 2009-05-20 11:40:57 +0400 |
commit | 2abcb07b81bf1c54e2166dd15a634595fca8d9c6 (patch) | |
tree | a4204daf2abb2b81bb76f2bd8afb08b7eaf0a2af /mcs/class/Mono.Messaging/Test | |
parent | 1c1d101fed359c757d2fb6f5cf3c51a203c0efc7 (diff) |
2009-05-19 Michael Barker <mike@middlesoft.co.uk>
* RabbitMQMessagingProviderTest.cs: Added test for dynamic create of
MessagingProvider
2009-05-19 Michael Barker <mike@middlesoft.co.uk>
* RabbitMQMessageQueue.cs: Added comments.
2009-05-19 Michael Barker <mike@middlesoft.co.uk>
* Makefile: Added environment variable for the RabbitMQMessagingProvider
2009-05-19 Michael Barker <mike@middlesoft.co.uk>
* MessageBaseTest.cs: Used reflection to create Message Object
2009-05-19 Michael Barker <mike@middlesoft.co.uk>
* IMessage.cs: Added additional comments.
* IMessagingProvider.cs: Added additional comments.
* MessagingProviderLocator.cs: Added support for specifing messaging
implementation using an environment variable.
svn path=/trunk/mcs/; revision=134437
Diffstat (limited to 'mcs/class/Mono.Messaging/Test')
-rw-r--r-- | mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs | 19 |
2 files changed, 20 insertions, 3 deletions
diff --git a/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog b/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog index 73ad821175a..17554938557 100644 --- a/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog +++ b/mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog @@ -2,3 +2,7 @@ * MessageBaseTest.cs: New * QueueReferenceTest.cs: New + +2009-05-19 Michael Barker <mike@middlesoft.co.uk> + + * MessageBaseTest.cs: Used reflection to create Message Object
\ No newline at end of file diff --git a/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs b/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs index 65c44f7eb4a..52a47047236 100644 --- a/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs +++ b/mcs/class/Mono.Messaging/Test/Mono.Messaging/MessageBaseTest.cs @@ -30,6 +30,8 @@ using System; using System.Messaging; +using System.Reflection; +using Mono.Messaging; using NUnit.Framework; @@ -41,7 +43,19 @@ namespace MonoTests.Mono.Messaging { [Test] public void CheckDefaultValues () { - Message m = new Message (); + Type[] types = { + typeof (IMessage), typeof (object), typeof (IMessageFormatter) + }; + + ConstructorInfo ci = typeof (Message).GetConstructor ( + BindingFlags.NonPublic | BindingFlags.Instance, + Type.DefaultBinder, types, new ParameterModifier[0]); + + if (ci == null) + throw new Exception ("ConstructorInfo is null"); + + Message m = (Message) ci.Invoke (new object[] { new MessageBase (), null, null }); + Assert.IsNull (m.Body, "Body default should be Null"); Assert.IsNull (m.Formatter, "Formatter default should null"); @@ -75,7 +89,7 @@ namespace MonoTests.Mono.Messaging { Assert.AreEqual ("", m.Label, "Label should default to \"\""); Assert.AreEqual (false, m.IsFirstInTransaction, "IsFirstInTransaction should default to false"); Assert.AreEqual (false, m.IsLastInTransaction, "IsLastInTransaction should default to false"); - Assert.AreEqual (MessagePriority.Normal, m.Priority, + Assert.AreEqual (System.Messaging.MessagePriority.Normal, m.Priority, "Priority should default to Normal"); Assert.AreEqual (false, m.Recoverable, "Recoverable should default to false"); Assert.AreEqual (null, m.ResponseQueue, "ResponseQueue should default to null"); @@ -95,6 +109,5 @@ namespace MonoTests.Mono.Messaging { "UseJournalQueue should default to false"); Assert.AreEqual (false, m.UseTracing, "UseTracing should default to false"); } - } } |