Changeset 9012


Ignore:
Timestamp:
12/06/12 16:44:43 (10 years ago)
Author:
mkommend
Message:

#1991: Corrected unit tests for BidirectionalDictionary to changes in r9009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalDictionaryTest.cs

    r9000 r9012  
    5353      try {
    5454        dict1.Add(4, 3.0);
    55       } catch (ArgumentException) { exceptionOnDuplicate = true; }
     55      }
     56      catch (ArgumentException) { exceptionOnDuplicate = true; }
    5657      Assert.IsTrue(exceptionOnDuplicate);
    5758      Assert.IsTrue(dict1.GetByFirst(4) == 2);
     
    6263
    6364      var dict2 = new BidirectionalDictionary<ComplexType, int>(new ComplexTypeEqualityComparer());
    64       Assert.IsTrue(!dict2.FirstEnumerable.Any());
     65      Assert.IsTrue(!dict2.Any());
    6566      dict2.Add(new ComplexType(1), 2);
    66       Assert.IsTrue(dict2.SecondEnumerable.Any());
     67      Assert.IsTrue(dict2.Any());
    6768      dict2.Add(new ComplexType(2), 1);
    6869      Assert.IsTrue(dict2.ContainsFirst(new ComplexType(2)));
     
    7172      try {
    7273        dict2.Add(new ComplexType(2), 3);
    73       } catch (ArgumentException) { exceptionOnDuplicate = true; }
     74      }
     75      catch (ArgumentException) { exceptionOnDuplicate = true; }
    7476      Assert.IsTrue(exceptionOnDuplicate);
    7577      exceptionOnDuplicate = false;
    7678      try {
    7779        dict2.Add(new ComplexType(3), 1);
    78       } catch (ArgumentException) { exceptionOnDuplicate = true; }
     80      }
     81      catch (ArgumentException) { exceptionOnDuplicate = true; }
    7982      Assert.IsTrue(exceptionOnDuplicate);
    8083      Assert.IsTrue(dict2.Count == 2);
     
    8285      Assert.IsTrue(dict2.GetByFirst(new ComplexType(1)) == 2);
    8386      dict2.Clear();
    84       Assert.IsTrue(!dict2.SecondEnumerable.Any());
     87      Assert.IsTrue(!dict2.Any());
    8588    }
    8689  }
Note: See TracChangeset for help on using the changeset viewer.