Search in sources :

Example 1 with DashboardResource

use of com.epam.ta.reportportal.ws.model.dashboard.DashboardResource in project service-api by reportportal.

the class DashboardConverterTest method toResource.

@Test
void toResource() {
    final Dashboard dashboard = getDashboard();
    final DashboardResource resource = DashboardConverter.TO_RESOURCE.apply(dashboard);
    assertEquals(resource.getDashboardId(), dashboard.getId());
    assertEquals(resource.getName(), dashboard.getName());
    assertEquals(resource.getDescription(), dashboard.getDescription());
    assertEquals(resource.getOwner(), dashboard.getOwner());
    assertEquals(resource.isShare(), dashboard.isShared());
    assertEquals(resource.getWidgets().size(), dashboard.getDashboardWidgets().size());
}
Also used : Dashboard(com.epam.ta.reportportal.entity.dashboard.Dashboard) DashboardResource(com.epam.ta.reportportal.ws.model.dashboard.DashboardResource) Test(org.junit.jupiter.api.Test)

Aggregations

Dashboard (com.epam.ta.reportportal.entity.dashboard.Dashboard)1 DashboardResource (com.epam.ta.reportportal.ws.model.dashboard.DashboardResource)1 Test (org.junit.jupiter.api.Test)1