use of wooteco.prolog.fixtures.AbilityAcceptanceFixture in project prolog by woowacourse.
the class AbilityStepDefinitions method 자식역량을추가하면.
@When("{string}의 자식역량 {string}(을)(를) 추가하(면)(고)")
public void 자식역량을추가하면(String parentAbility, String childAbility) {
AbilityAcceptanceFixture fixture = AbilityAcceptanceFixture.findByName(childAbility);
Long parentAbilityId = getAbilityIdByName(parentAbility);
AbilityCreateRequest request = fixture.toCreateRequestWithParentId(parentAbilityId);
context.invokeHttpPostWithToken("/abilities", request);
if (context.response.statusCode() == HttpStatus.OK.value()) {
context.storage.put(childAbility, context.response.as(HierarchyAbilityResponse.class));
}
}
use of wooteco.prolog.fixtures.AbilityAcceptanceFixture in project prolog by woowacourse.
the class AbilityStepDefinitions method 부모역량을추가하면.
@When("부모역량 {string}(을)(를) 추가하(면)(고)")
public void 부모역량을추가하면(String abilityName) {
AbilityAcceptanceFixture fixture = AbilityAcceptanceFixture.findByName(abilityName);
AbilityCreateRequest request = fixture.toCreateRequestWithParentId(null);
context.invokeHttpPostWithToken("/abilities", request);
if (context.response.statusCode() == HttpStatus.OK.value()) {
context.storage.put(abilityName, context.response.as(HierarchyAbilityResponse.class));
}
}
Aggregations