Exemplo n.º 1
0
        public void WebServiceHost3OpenTest()
        {
            Type serviceType = typeof(TestService);
            Uri baseAddress = new Uri(TestService.BaseAddress);
            using (WebServiceHost3 target = new WebServiceHost3(serviceType, baseAddress))
            {
                target.Open();

                Assert.AreEqual(1, target.Description.Endpoints.Count);
                foreach (ServiceEndpoint endpoint in target.Description.Endpoints)
                {
                    Assert.AreEqual(typeof(ITestService).FullName, endpoint.Contract.ContractType.FullName);
                    Assert.IsNotNull(endpoint.Behaviors.Find<WebHttpBehavior3>());
                }
            }
        }
Exemplo n.º 2
0
        public void WebServiceHost3OpenTest()
        {
            Type serviceType = typeof(TestService);
            Uri  baseAddress = new Uri(TestService.BaseAddress);

            using (WebServiceHost3 target = new WebServiceHost3(serviceType, baseAddress))
            {
                target.Open();

                Assert.AreEqual(1, target.Description.Endpoints.Count);
                foreach (ServiceEndpoint endpoint in target.Description.Endpoints)
                {
                    Assert.AreEqual(typeof(ITestService).FullName, endpoint.Contract.ContractType.FullName);
                    Assert.IsNotNull(endpoint.Behaviors.Find <WebHttpBehavior3>());
                }
            }
        }
Exemplo n.º 3
0
 public void MyTestInitialize()
 {
     jQueryServiceHost = new WebServiceHost3(typeof(JQueryWCFService), new Uri(Endpoint));
     jQueryServiceHost.Open();
 }
Exemplo n.º 4
0
 public void MyTestInitialize()
 {
     jQueryServiceHost = new WebServiceHost3(typeof(JQueryWCFService), new Uri(Endpoint));
     jQueryServiceHost.Open();
 }