protected override void Given()
 {
     _serverEndPoint = new IPEndPoint(IPAddress.Loopback, PortsHelper.GetAvailablePort(IPAddress.Loopback));
     _url = _HttpEndPoint.ToHttpUrl("/stats/tcp");
     
     var settings = ConnectionSettings.Create();
     _connection = EventStoreConnection.Create(settings, _node.TcpEndPoint);
     _connection.ConnectAsync().Wait();
     
     var testEvent = new EventData(Guid.NewGuid(),"TestEvent",true,Encoding.ASCII.GetBytes("{'Test' : 'OneTwoThree'}"),null);
     _connection.AppendToStreamAsync("tests",ExpectedVersion.Any,testEvent).Wait();
     
     _portableServer = new PortableServer(_serverEndPoint);
     _portableServer.SetUp();
 }
        protected override async Task Given()
        {
            _url = _node.ExtHttpEndPoint.ToHttpUrl(EndpointExtensions.HTTP_SCHEMA, "/stats/tcp");

            var settings = ConnectionSettings.Create();

            _connection = EventStoreConnection.Create(settings, _node.TcpEndPoint, _clientConnectionName);
            await _connection.ConnectAsync();

            var testEvent = new EventData(Guid.NewGuid(), "TestEvent", true,
                                          Encoding.ASCII.GetBytes("{'Test' : 'OneTwoThree'}"), null);
            await _connection.AppendToStreamAsync("tests", ExpectedVersion.Any, testEvent);

            _portableServer = new PortableServer(_node.ExtHttpEndPoint);
            _portableServer.SetUp();
        }
        protected override void Given()
        {
            _serverEndPoint = new IPEndPoint(IPAddress.Loopback, PortsHelper.GetAvailablePort(IPAddress.Loopback));
            _url            = _HttpEndPoint.ToHttpUrl("/stats/tcp");

            var settings = ConnectionSettings.Create();

            _connection = EventStoreConnection.Create(settings, _node.TcpEndPoint, _clientConnectionName);
            _connection.ConnectAsync().Wait();

            var testEvent = new EventData(Guid.NewGuid(), "TestEvent", true, Encoding.ASCII.GetBytes("{'Test' : 'OneTwoThree'}"), null);

            _connection.AppendToStreamAsync("tests", ExpectedVersion.Any, testEvent).Wait();

            _portableServer = new PortableServer(_serverEndPoint);
            _portableServer.SetUp();
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     _portableServer.SetUp();
 }
Ejemplo n.º 5
0
 public void SetUp()
 {
     _portableServer.SetUp(HttpBootstrap.RegisterPing);
 }
Ejemplo n.º 6
0
 public void SetUp()
 {
     _portableServer.SetUp(service => service.SetupController(new TestController(new FakePublisher())));
 }