コード例 #1
0
 public virtual void TestClear()
 {
     mm.Put("a", "b");
     mm.Put("a", "c");
     mm.Clear();
     Assert.AreEqual(0, mm.Size());
 }
コード例 #2
0
        public void TestClear()
        {
            IMultiMap <int, int> map = HashMultiMap <int, int> .Create();

            Assert.IsTrue(map.CountPairs == 0);
            map.Add(1, 2);
            map.Clear();
            Assert.IsTrue(map.CountPairs == 0);
        }
コード例 #3
0
        public void TestCountPair()
        {
            IMultiMap <int, int> map = HashMultiMap <int, int> .Create();

            map.Add(1, 3);
            map.Add(2, 3);
            map.Add(3, 4);
            map.Add(4, 5);
            map.Add(5, 6);
            Assert.IsTrue(map.CountPairs == 5);
            map.Clear();
            Assert.IsTrue(map.CountPairs == 0);
        }
コード例 #4
0
ファイル: PropertyBag.cs プロジェクト: citizenmatt/gallio
 /// <inheritdoc />
 public void Clear()
 {
     contents.Clear();
 }