File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
DataStructures.Tests/LinkedList Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using DataStructures . LinkedList . CircularLinkedList ;
3
+ using Microsoft . VisualStudio . TestPlatform . Utilities ;
3
4
using NUnit . Framework ;
4
5
5
6
namespace DataStructures . Tests . LinkedList ;
@@ -18,6 +19,15 @@ public static void TestDisplay()
18
19
Assert . That ( "10 20 30" , Is . EqualTo ( GetDisplayOutput ( cll ) . Trim ( ) ) ) ;
19
20
}
20
21
22
+ [ Test ]
23
+ public static void TestDisplayEmptyList ( )
24
+ {
25
+ var cll = new CircularLinkedList < int > ( ) ;
26
+ cll . Display ( ) ;
27
+
28
+ Assert . That ( "List is empty." , Is . EqualTo ( GetDisplayOutput ( cll ) . Trim ( ) ) ) ;
29
+ }
30
+
21
31
[ Test ]
22
32
public static void TestInsertAtBeginning ( )
23
33
{
@@ -69,6 +79,17 @@ public static void TestInsertAtEndInEmptyList()
69
79
Assert . That ( "10" , Is . EqualTo ( GetDisplayOutput ( cll ) . Trim ( ) ) ) ;
70
80
}
71
81
82
+ [ Test ]
83
+ public static void TestInsertAfterInEmptyList ( )
84
+ {
85
+ var cll = new CircularLinkedList < int > ( ) ;
86
+ cll . InsertAfter ( 10 , 20 ) ;
87
+
88
+ Assert . That ( "List is empty." , Is . EqualTo ( GetDisplayOutput ( cll ) . Trim ( ) ) ) ;
89
+ }
90
+
91
+
92
+
72
93
[ Test ]
73
94
public static void TestInsertAfterSpecificNode ( )
74
95
{
You can’t perform that action at this time.
0 commit comments