File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
UnitTest/DataStructuresTests Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,13 @@ public static void TestingCantOverrideFunctionality()
102
102
circularBuffer . Write ( 3 ) ;
103
103
circularBuffer . Write ( 34 ) ;
104
104
circularBuffer . Write ( 24 ) ;
105
- // if it doesn't override, then the values above will be read else,
106
- // the value below will be read
107
- circularBuffer . Write ( 2 ) ;
108
- circularBuffer . Write ( 1 ) ;
109
- circularBuffer . Write ( 3 ) ;
110
-
105
+ // if it doesn't override, then it will throw CircularBufferFullException
106
+ Assert . Throws < CircularBufferFullException > ( ( ) =>
107
+ {
108
+ circularBuffer . Write ( 2 ) ;
109
+ } ) ;
110
+
111
+ // Ensuring that it reads the appropriate values in the buffer.
111
112
var result1 = circularBuffer . Read ( ) ;
112
113
var result2 = circularBuffer . Read ( ) ;
113
114
var result3 = circularBuffer . Read ( ) ;
You can’t perform that action at this time.
0 commit comments