Example #1
0
        public void TestCount()
        {
            IBagSort   b = new BagSort();
            List <int> l = new List <int>()
            {
                1, 2, 3, -9, -5
            };

            Assert.IsTrue(b.Count(l) == 5);
        }
Example #2
0
        public void TestGet()
        {
            IBagSort   b = new BagSort();
            List <int> l = new List <int>()
            {
                1, 2, 3, -9, -5
            };

            Assert.IsTrue(b.GetInt(l) == -9);
        }
Example #3
0
        public void TestRemove()
        {
            IBagSort   b = new BagSort();
            List <int> l = new List <int>()
            {
                1, 2, 3, -9, -5
            };

            b.RemoveInt(l);
            Assert.IsTrue(l.Count == 4);
        }
Example #4
0
        public void TestAdd()
        {
            IBagSort   b    = new BagSort();
            List <int> test = new List <int>()
            {
                5, 6, 1
            };

            b.AddInt(9, test);
            Assert.IsTrue(test.Count == 4);
        }