MessageTest.cs 757 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // MessageTest.cs: Test cases for Message
  3. //
  4. // Authors:
  5. // Rolf Bjarne Kvinge ([email protected])
  6. //
  7. // (C) 2006 Novell, Inc. (http://www.novell.com)
  8. //
  9. using System;
  10. using System.Drawing;
  11. using System.Reflection;
  12. using System.Windows.Forms;
  13. using NUnit.Framework;
  14. namespace MonoTests.System.Windows.Forms
  15. {
  16. [TestFixture]
  17. public class MessageTest
  18. {
  19. [Test]
  20. public void ToStringTest ()
  21. {
  22. Message msg = Message.Create (new IntPtr (123), 2, new IntPtr (234), new IntPtr (345));
  23. Assert.AreEqual ("msg=0x2 (WM_DESTROY) hwnd=0x7b wparam=0xea lparam=0x159 result=0x0", msg.ToString ());
  24. msg.Result = new IntPtr (2);
  25. Assert.AreEqual ("msg=0x2 (WM_DESTROY) hwnd=0x7b wparam=0xea lparam=0x159 result=0x2", msg.ToString ());
  26. }
  27. }
  28. }