unit test for empty and full buffer

This commit is contained in:
priyank-sriv
2020-06-15 19:27:30 +05:30
parent 02e7129ff5
commit 7479e7b5a0
2 changed files with 20 additions and 12 deletions
@@ -1,7 +1,7 @@
package com.baeldung.circularbuffer;
public class CircularBuffer<E> {
private static final int DEFAULT_CAPACITY = 8;
private final int capacity;
@@ -18,11 +18,6 @@ public class CircularBuffer<E> {
this.writeSequence = -1;
}
/**
* Adds a new element to the buffer, if the buffer is not full
* @param element
* @return
*/
public boolean offer(E element) {
if (!isFull()) {