2010-05-25 Jb Evain <jbevain@novell.com>
[mcs.git] / class / System.Runtime.Remoting / Test / HttpCalls.cs
blob439aa6ea14ea0c899cd70090c629bef24bf3bf80
1 //
2 // MonoTests.Remoting.HttpCalls.cs
3 //
4 // Author: Lluis Sanchez Gual (lluis@ximian.com)
5 //
6 // 2003 (C) Copyright, Ximian, Inc.
7 //
9 using System;
10 using System.Collections;
11 using System.Runtime.Remoting;
12 using System.Runtime.Remoting.Channels;
13 using System.Runtime.Remoting.Channels.Http;
14 using NUnit.Framework;
16 namespace MonoTests.Remoting
18 //[TestFixture]
19 public class HttpSyncCallTest : SyncCallTest
21 public override ChannelManager CreateChannelManager ()
23 return new HttpChannelManager ();
27 //[TestFixture]
28 public class HttpAsyncCallTest : AsyncCallTest
30 public override ChannelManager CreateChannelManager ()
32 return new HttpChannelManager ();
36 //[TestFixture]
37 public class HttpReflectionCallTest : ReflectionCallTest
39 public override ChannelManager CreateChannelManager ()
41 return new HttpChannelManager ();
45 //[TestFixture]
46 public class HttpDelegateCallTest : DelegateCallTest
48 public override ChannelManager CreateChannelManager ()
50 return new HttpChannelManager ();
54 //[TestFixture]
55 public class HttpBinarySyncCallTest : SyncCallTest
57 public override ChannelManager CreateChannelManager ()
59 return new HttpChannelManager ();
63 [Serializable]
64 public class HttpChannelManager : ChannelManager
66 public override IChannelSender CreateClientChannel ()
68 Hashtable options = new Hashtable ();
69 options ["timeout"] = 10000; // 10s
70 return new HttpClientChannel (options, null);
73 public override IChannelReceiver CreateServerChannel ()
75 return new HttpChannel (0);
79 [Serializable]
80 public class HttpBinaryChannelManager : ChannelManager
82 public override IChannelSender CreateClientChannel ()
84 Hashtable options = new Hashtable ();
85 options ["timeout"] = 10000; // 10s
86 options ["name"] = "binary http channel";
87 return new HttpClientChannel (options, new BinaryClientFormatterSinkProvider ());
90 public override IChannelReceiver CreateServerChannel ()
92 return new HttpChannel (0);