Exemple #1
0
 public static API_WebGoat start(this API_WebGoat webGoat)
 {
     if (webGoat.installOk())
     {
         if (webGoat.serverOnWebGoatPort())
         {
             "[API_WebGoat] Aborting start since there is already a web server on the expected location".error();
         }
         else
         {
             var startCommand = webGoat.startWebGoatCommand();
             "Starting webgoat with the command: {0}".info(startCommand);
             webGoat.WebGoatProcess = Processes.startProcess(startCommand);
             webGoat.sleep(4000);
             if (webGoat.serverOnWebGoatPort())
             {
                 "[API_WebGoat] Web server started ok".info();
             }
             else
             {
                 "[API_WebGoat After 5 secs the web server was still not available".error();
             }
         }
     }
     return(webGoat);
 }
Exemple #2
0
 public static bool installOk(this API_WebGoat webGoat)
 {
     if (webGoat.Dir_LocalInstallation.dirExists().isFalse())
     {
         return(false);
     }
     if (webGoat.startWebGoatCommand().fileExists().isFalse())
     {
         return(false);
     }
     return(true);
 }