use of com.epam.ta.reportportal.database.entity.statistics.ExecutionCounter in project commons-dao by reportportal.
the class TestItemRepositoryTest method updateExecutionStatisticsTest.
@Test
public void updateExecutionStatisticsTest() {
final TestItem testItem = new TestItem();
testItem.setStatistics(new Statistics(new ExecutionCounter(2, 2, 0, 0), new IssueCounter()));
testItem.setStatus(Status.PASSED);
testItemRepository.save(testItem);
testItemRepository.updateExecutionStatistics(testItem);
final TestItem item = testItemRepository.findOne(testItem.getId());
final ExecutionCounter executionCounter = item.getStatistics().getExecutionCounter();
assertThat(executionCounter.getTotal()).isEqualTo(3);
assertThat(executionCounter.getFailed()).isEqualTo(0);
assertThat(executionCounter.getPassed()).isEqualTo(3);
assertThat(executionCounter.getSkipped()).isEqualTo(0);
}
Aggregations