コード例 #1
0
ファイル: Client.cs プロジェクト: MatthewChudleigh/solipsist
        public void GivenIHaveAClient(string endpoint)
        {
            var wait = new System.Threading.AutoResetEvent(false);
            var client = new Wcf.ServiceClient(endpoint);
            
            client.InnerChannel.Opened += (sender, args) => wait.Set();
            client.Open();

            Assert.IsTrue(wait.WaitOne(TimeSpan.FromSeconds(1)));

            ScenarioContext.Current.Set(client);
        }
コード例 #2
0
        public void GivenIHaveAClient(string endpoint)
        {
            var wait   = new System.Threading.AutoResetEvent(false);
            var client = new Wcf.ServiceClient(endpoint);

            client.InnerChannel.Opened += (sender, args) => wait.Set();
            client.Open();

            Assert.IsTrue(wait.WaitOne(TimeSpan.FromSeconds(1)));

            ScenarioContext.Current.Set(client);
        }