Ejemplo n.º 1
0
        public void Search(int[] data, int value, int expected)
        {
            var search = new SequentialSearch(data);
            var idx    = search.Search(value);

            Assert.AreEqual(expected, idx);
        }
Ejemplo n.º 2
0
        public void SequenSearchTest2()
        {
            var list = new List <int>()
            {
                89, 45, 68, 90, 100, 29, 34, 17, 55
            };

            Assert.Equal(-1, SequentialSearch.Search(list, 99));
        }