Example #1
0
        public void the_results_should_be_the_same_instance()
        {
            var host = new HttpListenerHost();
            host.Initialize(new[] { "http://+:" + PORT + "/" }, "/", typeof(DependencyResolverAccessorStub));
            var instance1 = host.ResolverAccessor;
            var instance2 = host.ResolverAccessor;

            instance1.ShouldBeTheSameInstanceAs(instance2);
        }
 public override void Initialize()
 {
     this.host = new HttpListenerHostWithConfiguration(new Configurator());
     this.host.Initialize(new[] { "http://+:" + Port + "/" }, "/", null);
     this.host.StartListening();
 }
 public override void Dispose()
 {
     this.host.Close();
     this.host = null;
 }
 public override void Dispose()
 {
     _host.Close();
     _host = null;
 }