private void AssertEvents(EventBean[] expected, RollingEventBuffer buffer) { for (int i = 0; i < expected.Length; i++) { Assert.AreSame(expected[i], buffer.Get(i)); } TryInvalid(buffer, expected.Length); }
private void TryInvalid(RollingEventBuffer buffer, int index) { try { buffer.Get(index); Assert.Fail(); } catch (ArgumentException) { // expected } }
public void SetUp() { bufferOne = new RollingEventBuffer(1); bufferTwo = new RollingEventBuffer(2); bufferFive = new RollingEventBuffer(5); }