ListDictionaryTest.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // ListDictionaryTest.cs
  3. // - NUnit Test Cases for System.Collections.Specialized.ListDictionary.cs
  4. //
  5. // Authors:
  6. // Duncan Mak ([email protected])
  7. // Alon Gazit ([email protected])
  8. //
  9. //
  10. // Copyright (C) 2003 Ximian Inc.
  11. //
  12. using NUnit.Framework;
  13. using System;
  14. using System.Collections;
  15. using System.Collections.Specialized;
  16. namespace MonoTests.System.Collections.Specialized
  17. {
  18. [TestFixture]
  19. public class ListDictionaryTest : Assertion
  20. {
  21. [Test, ExpectedException (typeof (ArgumentNullException))]
  22. public void CopyTo1 ()
  23. {
  24. ListDictionary ld = new ListDictionary ();
  25. ld.CopyTo (null, 0);
  26. }
  27. [Test, ExpectedException (typeof (ArgumentOutOfRangeException))]
  28. public void CopyTo2 ()
  29. {
  30. ListDictionary ld = new ListDictionary ();
  31. ld.CopyTo (new int[1],-1);
  32. }
  33. [Test, ExpectedException (typeof (ArgumentNullException))]
  34. public void Remove ()
  35. {
  36. ListDictionary ld = new ListDictionary ();
  37. ld.Remove (null);
  38. }
  39. }
  40. }