DictionaryEntryTest.cs 747 B

12345678910111213141516171819202122232425262728293031323334
  1. // DictionaryEntryTest
  2. using System;
  3. using System.Collections;
  4. using NUnit.Framework;
  5. namespace MonoTests.System.Collections {
  6. [TestFixture]
  7. public class DictionaryEntryTest : Assertion {
  8. [Test]
  9. public void Ctor () {
  10. DictionaryEntry d = new DictionaryEntry (1, "something");
  11. AssertNotNull (d);
  12. AssertEquals ("#01", d.Key, 1);
  13. AssertEquals ("#02", d.Value, "something");
  14. }
  15. [Test]
  16. public void Key () {
  17. DictionaryEntry d = new DictionaryEntry (1, "something");
  18. d.Key = 77.77;
  19. AssertEquals ("#03", d.Key, 77.77);
  20. }
  21. [Test]
  22. public void Value () {
  23. DictionaryEntry d = new DictionaryEntry (1, "something");
  24. d.Value = 'p';
  25. AssertEquals ("#04", d.Value, 'p');
  26. }
  27. }
  28. }