Author: atsushi
Date: 2008-02-15 07:29:21 -0500 (Fri, 15 Feb 2008)
New Revision: 95745
Modified:
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/ChangeLog
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
Log:
2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
* WebHttpDispatchOperationSelectorTest.cs : added couple more tests
with different contract contract case.
Modified:
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/ChangeLog
===================================================================
---
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/ChangeLog
2008-02-15 12:28:43 UTC (rev 95744)
+++
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/ChangeLog
2008-02-15 12:29:21 UTC (rev 95745)
@@ -1,5 +1,10 @@
2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * WebHttpDispatchOperationSelectorTest.cs : added couple more tests
+ with different contract contract case.
+
+2008-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* WebHttpDispatchOperationSelectorTest.cs : new test.
2008-02-13 Atsushi Enomoto <[EMAIL PROTECTED]>
Modified:
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
===================================================================
---
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
2008-02-15 12:28:43 UTC (rev 95744)
+++
trunk/olive/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
2008-02-15 12:29:21 UTC (rev 95745)
@@ -60,8 +60,28 @@
[Test]
public void SelectOperation ()
{
+ SelectOperationCore (Create ());
+ }
+
+ [Test]
+ public void SelectOperation2 ()
+ {
+ SelectOperationCore (Create2 ());
+ }
+
+ [Test]
+ public void SelectOperation3 ()
+ {
+ ContractDescription cd =
ContractDescription.GetContract (typeof (MyService2));
+ Assert.IsNotNull (cd.Operations
[0].Behaviors.Find<WebGetAttribute> (), "#1");
+
+ cd = ContractDescription.GetContract (typeof
(MyService));
+ Assert.IsNull (cd.Operations
[0].Behaviors.Find<WebGetAttribute> (), "#2");
+ }
+
+ void SelectOperationCore (MySelector d)
+ {
string name;
- var d = Create ();
var msg = Message.CreateMessage (MessageVersion.Soap12,
"http://temuri.org/MyService/Echo"); // looks like Version is not checked
Assert.IsNull (msg.Headers.To, "#1-0");
Assert.IsFalse (d.SelectOperation (ref msg, out name),
"#1");
@@ -97,7 +117,7 @@
[Test]
[Category ("NotWorking")]
- public void SelectOperation2 ()
+ public void SelectOperationOnlyMessage ()
{
// This test shows strange result ... it adds
UriMatched property while it does not really match the URI.
@@ -165,7 +185,8 @@
public interface MyService2
{
[OperationContract (Name = "Echo")]
- string Echo (string intput);
+ [WebGet] // UriTemplate = "Echo?input={input}"
+ string Echo (string input);
}
MySelector Create ()
@@ -178,5 +199,13 @@
//se.Behaviors.Add (b);
//return (MySelector) b.GetPublicOperationSelector (se);
}
+
+ MySelector Create2 ()
+ {
+ ServiceEndpoint se = new ServiceEndpoint
(ContractDescription.GetContract (typeof (MyService2)));
+ se.Address = new EndpointAddress
("http://localhost:8080");
+ //se.Contract.Operations [0].Behaviors.Add (new
WebGetAttribute ());
+ return new MySelector (se);
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches