コード例 #1
0
        public void TestIndexOf()
        {
            var queue = new LavalinkQueue();

            Assert.Empty(queue);
            Assert.Throws <ArgumentNullException>(() => queue.IndexOf(null));
            Assert.Equal(-1, queue.IndexOf(DummyTrack));

            queue.Add(DummyTrack);

            Assert.Equal(0, queue.IndexOf(DummyTrack));
        }
コード例 #2
0
        public void TestInsert()
        {
            var queue = new LavalinkQueue();

            Assert.Empty(queue);

            queue.Insert(0, DummyTrack);
            Assert.Equal(0, queue.IndexOf(DummyTrack));
        }