예제 #1
0
        public void CreateServer_should_throw_if_clusterId_is_null()
        {
            var subject = new ServerFactory(_clusterConnectionMode, _settings, _connectionPoolFactory, _serverMonitorFactory, _eventSubscriber);

            Action act = () => subject.CreateServer(null, _endPoint);

            act.ShouldThrow <ArgumentNullException>();
        }
예제 #2
0
        public void CreateServer_should_throw_if_endPoint_is_null()
        {
            var subject = new ServerFactory(_clusterConnectionMode, _settings, _connectionPoolFactory, _heartbeatConnectionFactory, _listener);

            Action act = () => subject.CreateServer(_clusterId, null);

            act.ShouldThrow <ArgumentNullException>();
        }
예제 #3
0
        public void CreateServer_should_return_Server()
        {
            var subject = new ServerFactory(_clusterConnectionMode, _settings, _connectionPoolFactory, _heartbeatConnectionFactory, _listener);

            var result = subject.CreateServer(_clusterId, _endPoint);

            result.Should().NotBeNull();
            result.Should().BeOfType <ClusterableServer>();
        }
        public void CreateServer_should_throw_if_endPoint_is_null()
        {
            var subject      = new ServerFactory(_clusterConnectionMode, _connectionModeSwitch, _directConnection, _settings, _connectionPoolFactory, _serverMonitorFactory, _eventSubscriber, _serverApi);
            var clusterClock = new Mock <IClusterClock>().Object;

            Action act = () => subject.CreateServer(_clusterId, clusterClock, null);

            act.ShouldThrow <ArgumentNullException>();
        }
예제 #5
0
        public void CreateServer_should_return_Server()
        {
            var subject = new ServerFactory(_clusterConnectionMode, _settings, _connectionPoolFactory, _serverMonitorFactory, _eventSubscriber);

            var result = subject.CreateServer(_clusterId, _endPoint);

            result.Should().NotBeNull();
            result.Should().BeOfType <Server>();
        }
        public void CreateServer_should_throw_if_clusterClock_is_null()
        {
            var subject   = new ServerFactory(_clusterConnectionMode, _connectionModeSwitch, _directConnection, _settings, _connectionPoolFactory, _serverMonitorFactory, _eventSubscriber, _serverApi);
            var clusterId = new ClusterId();

            Action act = () => subject.CreateServer(ClusterType.Unknown, clusterId, null, _endPoint);

            act.ShouldThrow <ArgumentNullException>();
        }
        public void CreateServer_should_return_Server()
        {
            var subject      = new ServerFactory(_clusterConnectionMode, _connectionModeSwitch, _directConnection, _settings, _connectionPoolFactory, _serverMonitorFactory, _eventSubscriber, _serverApi);
            var clusterClock = new Mock <IClusterClock>().Object;

            var result = subject.CreateServer(_clusterId, clusterClock, _endPoint);

            result.Should().NotBeNull();
            result.Should().BeOfType <Server>();
        }
        public void CreateServer_should_throw_if_clusterId_is_null()
        {
            var subject = new ServerFactory(_settings, _connectionPoolFactory, _heartbeatConnectionFactory, _listener);

            Action act = () => subject.CreateServer(null, _endPoint);

            act.ShouldThrow<ArgumentNullException>();
        }
        public void CreateServer_should_return_Server()
        {
            var subject = new ServerFactory(_settings, _connectionPoolFactory, _heartbeatConnectionFactory, _listener);

            var result = subject.CreateServer(_clusterId, _endPoint);

            result.Should().NotBeNull();
            result.Should().BeOfType<ClusterableServer>();
        }
        public void CreateServer_should_throw_if_endPoint_is_null()
        {
            var subject = new ServerFactory(_clusterConnectionMode, _settings, _connectionPoolFactory, _heartbeatConnectionFactory, _eventSubscriber);

            Action act = () => subject.CreateServer(_clusterId, null);

            act.ShouldThrow<ArgumentNullException>();
        }
예제 #11
0
        public void CreateServer_should_return_Server()
        {
            var subject = new ServerFactory(_clusterConnectionMode, _settings, _connectionPoolFactory, _serverMonitorFactory, _eventSubscriber);

            var result = subject.CreateServer(_clusterId, _endPoint);

            result.Should().NotBeNull();
            result.Should().BeOfType<Server>();
        }