Пример #1
0
        public void RemoveNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.Remove(null))
            .ShouldThrow <ArgumentNullException>();
        }
Пример #2
0
        public void InsertBeforeTailOfEmptyList_ShouldThrowInvalidOperationException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertBefore(l.Tail, DblLinkedList.CreateNode("1")))
            .ShouldThrow <InvalidOperationException>();
        }
Пример #3
0
        public void InsertAfterHeadOfEmptyList_ShouldThrowInvalidOperationException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertAfter(l.Head, DblLinkedList.CreateNode("1")))
            .ShouldThrow <InvalidOperationException>();
        }
Пример #4
0
        public void InsertAfterNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertAfter(null, DblLinkedList.CreateNode("1")))
            .ShouldThrow <ArgumentNullException>();
        }
Пример #5
0
        public void InsertAfterHeadNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertAfter(l.Head, null))
            .ShouldThrow <ArgumentNullException>();
        }
Пример #6
0
        public void InsertBeforeTailNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertBefore(l.Tail, null))
            .ShouldThrow <ArgumentNullException>();
        }