public void IndexOfChokesOnBadIndex(Position position)
        {
            var index = PositionToIndex(position);
            var sut   = new CopyOnWriteList <T>(Samples);

            Assert.Catch <ArgumentOutOfRangeException>(() => sut.IndexOf(TestData <T> .One, index));
            Assert.Catch <ArgumentOutOfRangeException>(() => sut.IndexOf(TestData <T> .One, index, 0));
        }
        public int IndexOfWithCountReturnsPositionWhenFoundOtherwiseNegativeOne(T item, int index, int count)
        {
            var sut = new CopyOnWriteList <T>(Samples);

            return(sut.IndexOf(item, index, count));
        }
        public int IndexOfReturnsPositionWhenFoundOtherwiseNegativeOne(T item, int index)
        {
            var sut = new CopyOnWriteList <T>(Samples.Concat(Samples));

            return(sut.IndexOf(item, index));
        }
        [Test] public void IndexOfChokesOnBadCount()
        {
            var sut = new CopyOnWriteList <T>(Samples);

            Assert.Catch <ArgumentOutOfRangeException>(() => sut.IndexOf(TestData <T> .One, 0, -1));
        }