Example #1
0
        public void ShouldReturnTrueIfElementExists()
        {
            SortableCollection.SortableCollection collection = new SortableCollection.SortableCollection(new int[] { 1, 5, 4, 2, 7, -1, 0 });

            Assert.IsTrue(collection.LinearSearch(4));
        }
Example #2
0
        public void ShouldReturnFalseIfElementDoesNotExist()
        {
            SortableCollection.SortableCollection collection = new SortableCollection.SortableCollection(new int[] { 1, 5, 4, 2, 7, -1, 0 });

            Assert.IsFalse(collection.LinearSearch(3));
        }