Пример #1
0
 public void CreateImposter(Imposter imposter)
 {
     var json = JsonConvert.SerializeObject(imposter);
     var response = ExecutePost(ImpostersResource, json);
     HandleResponse(response, HttpStatusCode.Created,
         $"Failed to create the imposter with port {imposter.Port} and protocol {imposter.Protocol}.");
 }
Пример #2
0
 /// <summary>
 /// Submits imposter if pending to be created in mountebank. 
 /// Will throw a MountebankException if unable to create the imposter for any reason.
 /// </summary>
 public void Submit(Imposter imposter)
 {
     Submit(new [] { imposter });
 }