Esempio n. 1
0
        public void ShouldClaimAndGet()
        {
            Assert.AreEqual(Sequence.InitialCursorValue, _ringBuffer.Cursor);

            var expectedEvent = new StubValueEvent(2701);

            var     claimSequence = _ringBuffer.Next();
            ref var oldEvent      = ref _ringBuffer[claimSequence];
Esempio n. 2
0
        public void ShouldHandleFatalException()
        {
            var causeException = new Exception();
            var evt            = new StubValueEvent(0);

            var exceptionHandler = new ValueFatalExceptionHandler <StubValueEvent>();

            try
            {
                exceptionHandler.HandleEventException(causeException, 0L, ref evt);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(causeException, ex.InnerException);
            }
        }
 public void OnEvent(ref StubValueEvent data, long sequence, bool endOfBatch)
 {
     OnEvent(sequence, endOfBatch);
 }