public void StartPACTServer(IGingerAction GA, int port) { Console.WriteLine("Starting PACT server at port: " + port); // check input params and add errors if invalid if (port == 0) { GA.AddError("Port cannot be 0"); return; } try { SV = new ServiceVirtualization(port); GA.AddOutput("port", port); GA.AddOutput("url", SV.MockProviderServiceBaseUri); //ExInfo GA.AddExInfo("PACT Mock Server Started on port: " + port + " " + SV.MockProviderServiceBaseUri); Console.WriteLine("PACT Server started"); } catch (Exception ex) { GA.AddError("Error starting PACT Mock Server: " + ex.Message); Console.WriteLine("Error starting PACT Mock Server: " + ex.Message); } }
public void StopPACTServer(IGingerAction GA) { // Act SV.MockProviderService.Stop(); SV = null; //ExInfo GA.AddExInfo("PACT Mock Server Stopped"); }