package de.itemis.mosig.ringbuffer;

import org.junit.Assert;
import org.junit.Test;

public class CircularBufferTest {

	@Test
	public void constructorShouldSetProvidedSize() {
		CircularBuffer underTest = new CircularBuffer(3);
		Assert.assertEquals(3, underTest.size());
	}
}

@@ -30,16 +30,42 @@
 uffer;%0A%0A
+import java.util.Random;%0A%0A
 import o
@@ -81,16 +81,16 @@
 Assert;%0A
-
 import o
@@ -160,17 +160,42 @@
 ic void 
-c
+whenPassingRandomNbrToTheC
 onstruct
@@ -201,32 +201,92 @@
 torS
+izeS
 hould
-SetProvidedSize() %7B
+BeThatNbr() %7B%0A%09%09int expectedSize = new Random().nextInt(Integer.MAX_VALUE);
 %0A%09%09C
@@ -330,17 +330,28 @@
 rBuffer(
-3
+expectedSize
 );%0A%09%09Ass
@@ -371,9 +371,20 @@
 als(
-3
+expectedSize
 , un

Test now uses random nbr.