public void BootStrap_the_Application_With_the_Self_Hosted_Server()
 {
     var application = new BootStrapApplication();
     HttpSelfHostServer server= application.ConfigureServer();
     server.Should().NotBeNull();
     server.CloseAsync().Wait();
 }
 public void Bootstrap_Application_With_the_default_route()
 {
     var application = new BootStrapApplication();
     var server = application.ConfigureServer();
     server.Configuration.Routes.Count.Should().Be(1);
     server.CloseAsync().Wait();
 }
예제 #3
0
 public void Setup()
 {
     var path = Environment.CurrentDirectory.Replace(@"bin\Debug", "");
     zipFilepath = path + "ExampleZip.zip";
     var application = new BootStrapApplication();
     server = application.ConfigureServer();
 }
 public void Create_A_Folders_Content_and_the_Temp_For_Deploying_The_App()
 {
     var application = new BootStrapApplication();
     var server = application.ConfigureServer();
     Directory.Exists(Environment.CurrentDirectory + @"\ContentFolder").Should().BeTrue();
     Directory.Exists(Environment.CurrentDirectory + @"\UnzippedContents").Should().BeTrue();
     server.CloseAsync().Wait();
 }
 public void Configure_the_Streaming_Mode_and_the_transfer_Mode_to_the_Server()
 {
     var application = new BootStrapApplication();
     var server = application.ConfigureServer();
     var selfHostConfiguration= server.Configuration as HttpSelfHostConfiguration;
     selfHostConfiguration.MaxReceivedMessageSize.Should().Be(Int32.MaxValue);
     selfHostConfiguration.TransferMode.Should().Be(TransferMode.Streamed);
     server.CloseAsync().Wait();
 }
 public void Setup()
 {
     string outputDir = Path.Combine(@"E:\Programs\Source\Build\_PublishedWebsites\Papillion");
     zipFilepath = Path.Combine(Environment.CurrentDirectory, "Source.Zip");
     if (File.Exists(zipFilepath))
         File.Delete(zipFilepath);
     ZipFile.CreateFromDirectory(outputDir, zipFilepath);
     var application = new BootStrapApplication();
     server = application.ConfigureServer();
 }
 public void Ping_the_Server_for_the_Connectivity_Check()
 {
     var app = new BootStrapApplication();
     var server = app.ConfigureServer();
     using (var client = new HttpClient(server))
     {
         client.BaseAddress =new Uri("http://locahost:8172");
         var response = client.GetAsync("/api/Ping").Result;
         response.IsSuccessStatusCode.Should().BeTrue();
         server.CloseAsync().Wait();
     }
 }
예제 #8
0
 public void Start()
 {
     var application = new BootStrapApplication();
     selfhost = application.ConfigureServer();
 }