public void RemovesItemAtTheSpecifiedIndexInList()
            {
                var target = new TestableSnapshottingList <object> {
                    null
                };

                target.RemoveAt(0);

                Assert.Equal(0, target.Collection.Count);
            }
            public void ResetsSnapshotSoThatItIsRecreatedAtNextRead()
            {
                var target = new TestableSnapshottingList <object> {
                    null
                };

                target.GetSnapshot();

                target.RemoveAt(0);

                Assert.Null(target.Snapshot);
            }
            public void LocksCollectionForThreadSafety()
            {
                Task anotherThread;
                var  target = new TestableSnapshottingList <object> {
                    null
                };

                lock (target.Collection)
                {
                    anotherThread = TaskEx.Run(() => target.RemoveAt(0));
                    Assert.False(anotherThread.Wait(20));
                }

                Assert.True(anotherThread.Wait(20));
            }