Search in sources :

Example 1 with DescriptionSteps

use of com.epam.reportportal.jbehave.integration.DescriptionSteps in project allure-java by reportportal.

the class InlineDescriptionTest method verify_a_story_with_meta_attributes.

@Test
public void verify_a_story_with_meta_attributes() {
    run(format, STORY_PATH, new DescriptionSteps());
    ArgumentCaptor<StartTestItemRQ> startCaptor = ArgumentCaptor.forClass(StartTestItemRQ.class);
    verify(client).startTestItem(any(StartTestItemRQ.class));
    verify(client).startTestItem(same(storyId), any(StartTestItemRQ.class));
    verify(client).startTestItem(same(scenarioId), startCaptor.capture());
    ArgumentCaptor<FinishTestItemRQ> finishCaptor = ArgumentCaptor.forClass(FinishTestItemRQ.class);
    verify(client).finishTestItem(same(stepId), finishCaptor.capture());
    verify(client).finishTestItem(same(scenarioId), any(FinishTestItemRQ.class));
    verify(client).finishTestItem(same(stepId), any(FinishTestItemRQ.class));
    assertThat(startCaptor.getValue().getDescription(), emptyOrNullString());
    assertThat(finishCaptor.getValue().getDescription(), equalTo(DescriptionSteps.DESCRIPTION));
}
Also used : StartTestItemRQ(com.epam.ta.reportportal.ws.model.StartTestItemRQ) DescriptionSteps(com.epam.reportportal.jbehave.integration.DescriptionSteps) FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ) Test(org.junit.jupiter.api.Test)

Aggregations

DescriptionSteps (com.epam.reportportal.jbehave.integration.DescriptionSteps)1 FinishTestItemRQ (com.epam.ta.reportportal.ws.model.FinishTestItemRQ)1 StartTestItemRQ (com.epam.ta.reportportal.ws.model.StartTestItemRQ)1 Test (org.junit.jupiter.api.Test)1