Ejemplo n.º 1
0
 public void StartTest()
 {
     ReportLog.InitializationLogging(this.GetType().Name);
     ReportLog.WritingLogging(null, "Beginning of tests");
     ServiceHelper.GetAllRestRequest();
     GetToken();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Method for Delete request
        /// </summary>
        /// <param name="searchUrlByParameter"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public static string DeleteRequest(string searchUrlByParameter, params string[] parameters)
        {
            try
            {
                string          fullUrl     = UrlBuilder(FindUrl(searchUrlByParameter, HttpMethod.DELETE), parameters);
                HttpWebResponse webResponse = GetResponse(HttpMethod.DELETE, fullUrl);
                serviceResponse = GetServiceResponse(GetBody(webResponse));
            }
            catch (JsonException jsonException)
            {
                ReportLog.WritingLogging(jsonException);
            }
            catch (Exception exception)
            {
                ReportLog.WritingLogging(exception);
            }

            return(serviceResponse.content);
        }
Ejemplo n.º 3
0
 public void TestGetAllUser()
 {
     actualResponse = ServiceHelper.GetRequest(ServiceHelper.users, Token);
     ReportLog.WritingLogging(null, $"Test Get All User: result = \n {actualResponse}");
     Assert.AreEqual(124, actualResponse.Length);
 }
Ejemplo n.º 4
0
 public void Log(string message)
 {
     ReportLog.WritingLogging(null, message);
 }
Ejemplo n.º 5
0
 public void EndTest()
 {
     ReportLog.WritingLogging(null, "Ends of tests");
     ReportLog.Dispose();
 }