public void ShouldHandleRemoveOfUnexistingItem()
        {
            var table = new WeakMultiTable <int, int>();

            Assert.AreEqual(0, table.GetAllForLeft(0).Count());
            table.RemovePair(0, 0);
            Assert.AreEqual(0, table.GetAllForLeft(0).Count());
        }
示例#2
0
        public void ShouldHandleRemoveOfUnexistingItem()
        {
            var table = new WeakMultiTable<int, int>();

            Assert.AreEqual(0, table.GetAllForLeft(0).Count());
            table.RemovePair(0, 0);
            Assert.AreEqual(0, table.GetAllForLeft(0).Count());
        }
示例#3
0
        public void ShouldRemovePair()
        {
            var table = new WeakMultiTable<int, int>();
            table.Add(0, 0);
            table.Add(1, 1);

            Assert.AreEqual(1, table.GetAllForLeft(0).Count());
            Assert.AreEqual(1, table.GetAllForLeft(1).Count());

            table.RemovePair(0, 0);

            Assert.AreEqual(0, table.GetAllForLeft(0).Count());
            Assert.AreEqual(1, table.GetAllForLeft(1).Count());
        }
        public void ShouldRemovePair()
        {
            var table = new WeakMultiTable <int, int>();

            table.Add(0, 0);
            table.Add(1, 1);

            Assert.AreEqual(1, table.GetAllForLeft(0).Count());
            Assert.AreEqual(1, table.GetAllForLeft(1).Count());

            table.RemovePair(0, 0);

            Assert.AreEqual(0, table.GetAllForLeft(0).Count());
            Assert.AreEqual(1, table.GetAllForLeft(1).Count());
        }