예제 #1
0
        public void ZeroSizeUtilityListSelectTest()
        {
            var uList = new List <Utility>();
            var s     = new MaxUtilitySelector();

            Assert.That(s.Select(uList), Is.EqualTo(-1));
        }
예제 #2
0
        public void SelectTest()
        {
            var size = 20;
            var s    = new MaxUtilitySelector();

            for (int i = 0; i < 100; i++)
            {
                var list = SelectorTestsHelper.CreateRandomUtilityList(size);
                var aVal = s.Select(list);
                var cVal = MaxUtilityIndex(list);
                Assert.AreEqual(cVal, aVal);
            }
        }