Ejemplo n.º 1
0
 public static void APITest3()
 {
     try
     {
         var response = GenericHelpers.CallAPI(APItestResource.client, APItestResource.request3);
         APIObjects.MainObject apiObject = JsonConvert.DeserializeObject <APIObjects.MainObject>(response.Content);
         Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Ejemplo n.º 2
0
 public static void APITest2()
 {
     try
     {
         var response = GenericHelpers.CallAPI(APItestResource.client, APItestResource.request2);
         APIObjects.MainObject apiObject = JsonConvert.DeserializeObject <APIObjects.MainObject>(response.Content);
         Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
         Assert.AreEqual(TestdataValidation.firstName2, apiObject.data.first_name);
         Assert.AreEqual(TestdataValidation.lastName2, apiObject.data.last_name);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }