Пример #1
0
        public void deleteRequest(string url)
        {
            ExtentReprts extRept = new ExtentReprts();

            unirest_net.http.HttpResponse <string> jsonResponse = unirest_net.http.Unirest.delete(url).asString();
            extRept.reportSetup("DeleteTest.html");
            extRept.createTest("Delete Test");
            extRept.logReportStatement(AventStack.ExtentReports.Status.Pass, jsonResponse.Code.ToString());
            extRept.flushReport();
        }
Пример #2
0
        public void getRequest(string url)
        {
            unirest_net.http.HttpResponse <string> jsonResponse = unirest_net.http.Unirest.get(url).asString();
            ExtentReprts extRept = new ExtentReprts();

            extRept.reportSetup("GetTest.html");
            extRept.createTest("Get Test");
            extRept.logReportStatement(AventStack.ExtentReports.Status.Pass, jsonResponse.Body.ToString());
            extRept.flushReport();
        }
Пример #3
0
        public void putRequest(string url, object body)
        {
            ExtentReprts extRept = new ExtentReprts();

            unirest_net.http.HttpResponse <string> response = unirest_net.http.Unirest.put(url).body(body).asString();
            extRept.reportSetup("PutTest.html");
            extRept.createTest("Put Test");
            extRept.logReportStatement(AventStack.ExtentReports.Status.Pass, response.Body.ToString());
            extRept.flushReport();
        }