コード例 #1
0
 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);
 }
コード例 #2
0
 private void TryInvalid(RollingEventBuffer buffer, int index)
 {
     try
     {
         buffer.Get(index);
         Assert.Fail();
     }
     catch (ArgumentException)
     {
         // expected
     }
 }
コード例 #3
0
 public void SetUp()
 {
     bufferOne  = new RollingEventBuffer(1);
     bufferTwo  = new RollingEventBuffer(2);
     bufferFive = new RollingEventBuffer(5);
 }