コード例 #1
0
        public void SetUp()
        {
            Clear(true);

            _clientFactory = new SimpleWcfClientFactory
            {
                Logger = new DummyLogger()
            };

            _clientFactory.Initialize(new WcfClientFactoryConfig
            {
                ClientId = "SystemTests",
                Host     = "localhost",
                Port     = _hogController.HttpPort
            });

            _clientFactory.ClientConnected    += OnClientConnected;
            _clientFactory.ClientDisconnected += OnClientDisconnected;
            _clientFactory.ClientInfoChanged  += OnClientInfoChanged;
        }
コード例 #2
0
        public void TearDown()
        {
            SetBindingType(ServiceBindingType.BasicHttp);

            if (_clientFactory != null)
            {
                _clientFactory.ClientConnected    -= OnClientConnected;
                _clientFactory.ClientDisconnected -= OnClientDisconnected;
                _clientFactory.ClientInfoChanged  -= OnClientInfoChanged;

                _clientFactory.Dispose();

                _clientFactory = null;
            }

            _hogController.StartService("TestModule");
            bool result = _hogController.WaitForService("TestModule", ServerModuleState.Running, 5);

            Assert.IsTrue(result, "Service 'TestModule' did not reach state 'Running' ");

            _hogController.StartService("DependentTestModule");
            result = _hogController.WaitForService("DependentTestModule", ServerModuleState.Running, 5);
            Assert.IsTrue(result, "Service 'DependentTestModule' did not reach state 'Running' ");
        }