Changeset 9012
- Timestamp:
- 12/06/12 16:44:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalDictionaryTest.cs
r9000 r9012 53 53 try { 54 54 dict1.Add(4, 3.0); 55 } catch (ArgumentException) { exceptionOnDuplicate = true; } 55 } 56 catch (ArgumentException) { exceptionOnDuplicate = true; } 56 57 Assert.IsTrue(exceptionOnDuplicate); 57 58 Assert.IsTrue(dict1.GetByFirst(4) == 2); … … 62 63 63 64 var dict2 = new BidirectionalDictionary<ComplexType, int>(new ComplexTypeEqualityComparer()); 64 Assert.IsTrue(!dict2. FirstEnumerable.Any());65 Assert.IsTrue(!dict2.Any()); 65 66 dict2.Add(new ComplexType(1), 2); 66 Assert.IsTrue(dict2. SecondEnumerable.Any());67 Assert.IsTrue(dict2.Any()); 67 68 dict2.Add(new ComplexType(2), 1); 68 69 Assert.IsTrue(dict2.ContainsFirst(new ComplexType(2))); … … 71 72 try { 72 73 dict2.Add(new ComplexType(2), 3); 73 } catch (ArgumentException) { exceptionOnDuplicate = true; } 74 } 75 catch (ArgumentException) { exceptionOnDuplicate = true; } 74 76 Assert.IsTrue(exceptionOnDuplicate); 75 77 exceptionOnDuplicate = false; 76 78 try { 77 79 dict2.Add(new ComplexType(3), 1); 78 } catch (ArgumentException) { exceptionOnDuplicate = true; } 80 } 81 catch (ArgumentException) { exceptionOnDuplicate = true; } 79 82 Assert.IsTrue(exceptionOnDuplicate); 80 83 Assert.IsTrue(dict2.Count == 2); … … 82 85 Assert.IsTrue(dict2.GetByFirst(new ComplexType(1)) == 2); 83 86 dict2.Clear(); 84 Assert.IsTrue(!dict2. SecondEnumerable.Any());87 Assert.IsTrue(!dict2.Any()); 85 88 } 86 89 }
Note: See TracChangeset
for help on using the changeset viewer.