Search in sources :

Example 1 with TokenResponse

use of wooteco.prolog.login.application.dto.TokenResponse in project prolog by woowacourse.

the class LoginStepDefinitions method 멤버가로그인을하고.

@Given("{string}(이)(가) 로그인을 하고")
public void 멤버가로그인을하고(String member) {
    HashMap<String, Object> data = new HashMap<>();
    data.put("code", GithubResponses.findByName(member).getCode());
    context.invokeHttpPost("/login/token", data);
    TokenResponse tokenResponse = context.response.as(TokenResponse.class);
    context.accessToken = tokenResponse.getAccessToken();
    context.storage.put("username", GithubResponses.findByName(member).getLogin());
}
Also used : TokenResponse(wooteco.prolog.login.application.dto.TokenResponse) HashMap(java.util.HashMap) Given(io.cucumber.java.en.Given)

Example 2 with TokenResponse

use of wooteco.prolog.login.application.dto.TokenResponse in project prolog by woowacourse.

the class LoginStepDefinitions method 액세스토큰을받는다.

@Then("액세스 토큰을 받는다")
public void 액세스토큰을받는다() {
    TokenResponse tokenResponse = context.response.as(TokenResponse.class);
    assertThat(tokenResponse).isNotNull();
}
Also used : TokenResponse(wooteco.prolog.login.application.dto.TokenResponse) Then(io.cucumber.java.en.Then)

Aggregations

TokenResponse (wooteco.prolog.login.application.dto.TokenResponse)2 Given (io.cucumber.java.en.Given)1 Then (io.cucumber.java.en.Then)1 HashMap (java.util.HashMap)1