Beispiel #1
0
 public RestReq(string url = null)
 {
     if (url == null)
     {
         url = YamlReader.GetValue(("Base_url"));
     }
     _client = new RestClient(url);
 }
Beispiel #2
0
        public static void Start(string fileName)
        {
            var path     = System.AppDomain.CurrentDomain.BaseDirectory + "Mocks\\" + fileName;
            var imposter = File.ReadAllText(path);

            new RestReq(YamlReader.GetValue("Mountebank"))
            .Post("imposters")
            .AddHeader("Content-Type", "application/json")
            .AddJsonBody(imposter)
            .Execute();
        }
Beispiel #3
0
 public static void Stop()
 {
     new RestReq(YamlReader.GetValue("Mountebank"))
     .Delete("imposters")
     .Execute();
 }