public void setup()
 {
     _readyHandler = new TestCheckpointManagerMessageHandler();
     _stream = new EmittedStream(
         "test_stream", new EmittedStream.WriterConfiguration(new EmittedStream.WriterConfiguration.StreamMetadata(), null, maxWriteBatchLength: 50),
         new ProjectionVersion(1, 2, 2), new TransactionFilePositionTagger(0), CheckpointTag.FromPosition(0, 0, -1),
         _ioDispatcher, _readyHandler);
     _stream.Start();
 }
 public void setup()
 {
     _readyHandler = new TestCheckpointManagerMessageHandler();
     _stream = new EmittedStream(
         "test_stream", _writerConfiguration, new ProjectionVersion(1, 0, 0), new TransactionFilePositionTagger(0),
         CheckpointTag.FromPosition(0, 40, 30), _ioDispatcher, _readyHandler);
     _stream.Start();
     _stream.EmitEvents(
         new[]
         {
             new EmittedDataEvent(
                 "test_stream", Guid.NewGuid(), "type", true, "data", null, CheckpointTag.FromPosition(0, 200, 150), null)
         });
 }
 public void setup()
 {
     _readyHandler = new TestCheckpointManagerMessageHandler();
     ;
     _stream = new EmittedStream(
         "test", new EmittedStream.WriterConfiguration(new EmittedStream.WriterConfiguration.StreamMetadata(), null, 50), new ProjectionVersion(1, 0, 0),
         new TransactionFilePositionTagger(0), CheckpointTag.FromPosition(0, 0, -1), _ioDispatcher, _readyHandler);
     try
     {
         _stream.Checkpoint();
     }
     catch (Exception ex)
     {
         _caughtException = ex;
     }
 }
        public void setup()
        {
            _readyHandler = new TestCheckpointManagerMessageHandler();
            _stream = new EmittedStream(
                "test_stream", new EmittedStream.WriterConfiguration(new EmittedStream.WriterConfiguration.StreamMetadata(), null, maxWriteBatchLength: 50),
                new ProjectionVersion(1, 0, 0), new TransactionFilePositionTagger(0), CheckpointTag.FromPosition(0, 40, 30),
                _ioDispatcher, _readyHandler);
            _stream.Start();

            _stream.EmitEvents(
                new[]
                {
                    new EmittedDataEvent(
                        "test_stream", Guid.NewGuid(), "type", true, "data", new ExtraMetaData(new Dictionary<string, string> {{"a", "1"}, {"b", "{}"}}), CheckpointTag.FromPosition(0, 200, 150), null)
                });
        }
 public void Setup()
 {
     _readyHandler = new TestCheckpointManagerMessageHandler();
     _stream = new EmittedStream(
         "test", new EmittedStream.WriterConfiguration(new EmittedStream.WriterConfiguration.StreamMetadata(), null, 50), new ProjectionVersion(1, 0, 0),
         new TransactionFilePositionTagger(0), CheckpointTag.FromPosition(0, 0, -1), _ioDispatcher, _readyHandler);
     _stream.Start();
     _stream.EmitEvents(
         new[]
         {
             new EmittedDataEvent(
                 "test", Guid.NewGuid(), "type", true, "data", null, CheckpointTag.FromPosition(0, 10, 5), null)
         });
     var msg = _consumer.HandledMessages.OfType<ClientMessage.WriteEvents>().First();
     _bus.Publish(new ClientMessage.WriteEventsCompleted(msg.CorrelationId, 0, 0));
     _stream.Checkpoint();
 }
        public void setup()
        {
            _readyHandler = new TestCheckpointManagerMessageHandler();
            _writeAs = new OpenGenericPrincipal("test-user");
            _stream = new EmittedStream(
                "test_stream", new EmittedStream.WriterConfiguration(new EmittedStream.WriterConfiguration.StreamMetadata(), _writeAs, maxWriteBatchLength: 50),
                new ProjectionVersion(1, 0, 0), new TransactionFilePositionTagger(0), CheckpointTag.FromPosition(0, 40, 30),
                _ioDispatcher, _readyHandler);
            _stream.Start();

            _stream.EmitEvents(
                new[]
                {
                    new EmittedDataEvent(
                        "test_stream", Guid.NewGuid(), "type", true, "data", null, CheckpointTag.FromPosition(0, 200, 150), null)
                });
        }
        public void setup()
        {
            _causedBy = Guid.NewGuid();
            _correlationId = "correlation_id";

            _emittedDataEvent = new EmittedDataEvent(
                "test_stream", Guid.NewGuid(), "type", true, "data", null, CheckpointTag.FromPosition(0, 200, 150), null);

            _emittedDataEvent.SetCausedBy(_causedBy);
            _emittedDataEvent.SetCorrelationId(_correlationId);

            _readyHandler = new TestCheckpointManagerMessageHandler();
            _stream = new EmittedStream(
                "test_stream", new EmittedStream.WriterConfiguration(new EmittedStream.WriterConfiguration.StreamMetadata(), null, maxWriteBatchLength: 50),
                new ProjectionVersion(1, 0, 0), new TransactionFilePositionTagger(0), CheckpointTag.FromPosition(0, 40, 30),
                _ioDispatcher, _readyHandler);
            _stream.Start();
            _stream.EmitEvents(new[] {_emittedDataEvent});
        }