Exemplo n.º 1
0
        public void TestDefaultListenUrl()
        {
            this._sharpBoss = new SharpBoss();

            Assert.NotNull(this._sharpBoss);
            Assert.NotNull(this._sharpBoss.GetHttpServerListenUrl());
        }
Exemplo n.º 2
0
        public void TestListenUrlWithoutSlash()
        {
            var listenUrl = "http://localhost:4321";

            this._sharpBoss = new SharpBoss(listenUrl);

            Assert.NotNull(this._sharpBoss);
            Assert.AreEqual(listenUrl + "/", this._sharpBoss.GetHttpServerListenUrl());
        }
Exemplo n.º 3
0
        public void Setup()
        {
            (this._app, this._assembly) = WebServerFixture.CreateNewServer();
            var listenUrl = "http://localhost:4550";

            this._sharpBoss = new SharpBoss(listenUrl);
            this._sharpBoss.Run();
            this._client = new RestClient(listenUrl);
        }
Exemplo n.º 4
0
        public void TestListenUrlFromConfigWithoutSlash()
        {
            var listenUrl   = "http://localhost:2122";
            var appSettings = WebServerFixture.CreateConfigFile(listenUrl);

            this._sharpBoss = new SharpBoss(appSettings: appSettings);

            Assert.NotNull(this._sharpBoss);
            Assert.AreEqual(listenUrl + "/", this._sharpBoss.GetHttpServerListenUrl());
        }
Exemplo n.º 5
0
        public void TestListenUrlFromEnvironmentWithoutSlash()
        {
            var listenUrl = "http://localhost:3145";

            Environment.SetEnvironmentVariable("SHARPBOSS_URL", listenUrl);

            this._sharpBoss = new SharpBoss();

            Assert.NotNull(this._sharpBoss);
            Assert.AreEqual(listenUrl + "/", this._sharpBoss.GetHttpServerListenUrl());
        }