public void ThenAnErrorAccured() { APIKeyword ak = new APIKeyword(); //ExtentTest test = ExtentReport.extent.CreateTest("Checking error presence on registration with only username"); try { Assert.IsFalse(ak.Error() == null); // test.Log(Status.Pass, "error is present"); }catch (AssertFailedException e) { //test.Log(Status.Fail, "error is not present"); throw e; } }
public void ThenTokenIsGenerated() { APIKeyword ak = new APIKeyword(); //ExtentTest test = ExtentReport.extent.CreateTest("Token Availablity on successfull registration Test"); try { Assert.IsFalse(ak.Tokenvalue() == null); // test.Log(Status.Pass, "Token is available"); } catch (AssertFailedException e) { //test.Log(Status.Fail, "Token is not available"); throw e; } }
public void ThenRegistrationIsUnsucessfull() { APIKeyword ak = new APIKeyword(); //ExtentTest test = ExtentReport.extent.CreateTest("Registration with only username on 'reqres.in/api/register' Test"); try { Assert.AreEqual(400, ak.ResponseCode1()); // test.Log(Status.Pass, "Registration unsuccessful with only username"); } catch (AssertFailedException e) { //test.Log(Status.Fail, "Registration successful with only username"); throw e; } }
public void ThenUsersListOpened() { APIKeyword ak = new APIKeyword(); //ExtentTest test = ExtentReport.extent.CreateTest("user list on 'reqres.in/api/register' Test"); try { Assert.AreEqual(200, ak.ResponseCode2()); // test.Log(Status.Pass, "Response code matched"); } catch (AssertFailedException e) { //test.Log(Status.Fail, "Response code not matched"); throw e; } }
public void ThenRegistrationIsSucessfull() { //ExtentTest test = ExtentReport.extent.CreateTest("Registration test on 'reqres.in/api/register' with valid username and password"); APIKeyword ak = new APIKeyword(); try { Assert.AreEqual(200, ak.ResponseCode()); //test.Log(Status.Pass, "Registration successfull (Response code matched)"); } catch (AssertFailedException e) { //test.Log(Status.Fail, "Registration unsuccessfull(Response code not matched)"); throw e; } }
public void WhenIClickOnUserList() { APIKeyword ak = new APIKeyword(); ak.ListUsers(); }
public void WhenIRegisterANewUserWithUsername(string p0) { APIKeyword ak = new APIKeyword(); ak.UnSuccessfulRegistrationWithOnlyUsername(p0); }
public void WhenIRegisterANewUserWithUsernameAndPassword(string p0, string p1) { APIKeyword ak = new APIKeyword(); ak.SuccessfulRegistrationWithCorrectCredenials(p0, p1); }
public void ThenTheDataOfUsersShouldBePresent() { APIKeyword ak = new APIKeyword(); }