Esempio n. 1
0
        public void MultipleParameters()
        {
            var behavior = new WebHttpBehaviorExt();
            var cd       = ContractDescription.GetContract(typeof(IMultipleParameters));
            var se       = new ServiceEndpoint(cd, new WebHttpBinding(), new EndpointAddress("http://localhost:8080/"));

            behavior.Validate(se);

            foreach (var od in cd.Operations)
            {
                behavior.DoGetRequestClientFormatter(od, se);
            }
        }
Esempio n. 2
0
        public void MultipleParameters2()
        {
            var behavior = new WebHttpBehaviorExt();
            var cd       = ContractDescription.GetContract(typeof(IMultipleParametersGet));
            var se       = new ServiceEndpoint(cd, new WebHttpBinding(), new EndpointAddress("http://localhost:8080/"));

            behavior.Validate(se);

            try {
                foreach (var od in cd.Operations)
                {
                    behavior.DoGetRequestClientFormatter(od, se);
                }
                Assert.Fail("Should result in invalid operation");
            } catch (InvalidOperationException) {
            }
        }
Esempio n. 3
0
		public void MultipleParameters2 ()
		{
			var behavior = new WebHttpBehaviorExt ();
			var cd = ContractDescription.GetContract (typeof (IMultipleParametersGet));
			var se = new ServiceEndpoint (cd, new WebHttpBinding (), new EndpointAddress ("http://localhost:8080/"));
			behavior.Validate (se);

			try {
				foreach (var od in cd.Operations)
					behavior.DoGetRequestClientFormatter (od, se);
				Assert.Fail ("Should result in invalid operation");
			} catch (InvalidOperationException) {
			}
		}
Esempio n. 4
0
		public void MultipleParameters ()
		{
			var behavior = new WebHttpBehaviorExt ();
			var cd = ContractDescription.GetContract (typeof (IMultipleParameters));
			var se = new ServiceEndpoint (cd, new WebHttpBinding (), new EndpointAddress ("http://localhost:8080/"));
			behavior.Validate (se);

			foreach (var od in cd.Operations)
				behavior.DoGetRequestClientFormatter (od, se);
		}