Files
spring-boot-rest/libraries/src/test/java/com/baeldung/serenity/github/GithubUserProfilePayloadStepDefinitions.java
Grzegorz Piwowarek 87049b63f4 Build opt 22 06 (#2132)
* Drools reformat

* Further refactor

* Further refactor

* Refactor
2017-06-22 15:52:05 +02:00

31 lines
902 B
Java

package com.baeldung.serenity.github;
import net.thucydides.core.annotations.Steps;
import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;
import java.io.IOException;
public class GithubUserProfilePayloadStepDefinitions {
@Steps
private GithubRestAssuredUserAPISteps userAPISteps;
@Given("github user profile api")
public void givenGithubUserProfileApi() {
userAPISteps.withUserProfileAPIEndpoint();
}
@When("looking for $user via the api")
public void whenLookingForProfileOf(String user) throws IOException {
userAPISteps.getProfileOfUser(user);
}
@Then("github's response contains a 'login' payload same as $user")
public void thenGithubsResponseContainsAloginPayloadSameAs(String user) {
userAPISteps.profilePayloadShouldContainLoginValue(user);
}
}