+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TestFixtureBase.cs : try to fix this mannerless set of tests that
+ leaves comm objects open.
+
2008-10-07 Atsushi Enomoto <atsushi@ximian.com>
* TestFixtureBase.cs : until I sort out what's causing failure on
public abstract class TestFixtureBase<TClient, TServer, IServer> where TClient : new() where TServer: new()
{
ServiceHost _hostBase;
+ ChannelFactory<IServer> factory;
protected TestFixtureBase () { }
+ [TearDown]
+ public void TearDown ()
+ {
+ if (_hostBase != null)
+ _hostBase.Close ();
+ if (factory != null)
+ factory.Close ();
+ }
+
[SetUp]
public virtual void Run (){
bool runServer = true;
public IServer Client {
get {
- ChannelFactory<IServer> factory = new ChannelFactory<IServer> (new BasicHttpBinding (), new EndpointAddress (getEndpoint ()));
+ factory = new ChannelFactory<IServer> (new BasicHttpBinding (), new EndpointAddress (getEndpoint ()));
return factory.CreateChannel ();
}
}