Exemplo n.º 1
0
        public void RemoveNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.Remove(null))
            .ShouldThrow <ArgumentNullException>();
        }
Exemplo n.º 2
0
        public void InsertBeforeTailOfEmptyList_ShouldThrowInvalidOperationException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertBefore(l.Tail, DblLinkedList.CreateNode("1")))
            .ShouldThrow <InvalidOperationException>();
        }
Exemplo n.º 3
0
        public void InsertAfterHeadOfEmptyList_ShouldThrowInvalidOperationException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertAfter(l.Head, DblLinkedList.CreateNode("1")))
            .ShouldThrow <InvalidOperationException>();
        }
Exemplo n.º 4
0
        public void InsertAfterNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertAfter(null, DblLinkedList.CreateNode("1")))
            .ShouldThrow <ArgumentNullException>();
        }
Exemplo n.º 5
0
        public void InsertAfterHeadNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

            list.Invoking(l => l.InsertAfter(l.Head, null))
            .ShouldThrow <ArgumentNullException>();
        }
Exemplo n.º 6
0
        public void InsertBeforeTailNull_ShouldThrowArgumentException()
        {
            var list = new DblLinkedList <string>();

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