All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.chutneytesting.design.api.campaign.dto.ScenarioExecutionReportCampaignMapper Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package com.chutneytesting.design.api.campaign.dto;

import static com.chutneytesting.tools.ui.ComposableIdUtils.fromFrontId;
import static com.chutneytesting.tools.ui.ComposableIdUtils.toFrontId;
import static java.util.Optional.of;

import com.chutneytesting.design.domain.campaign.ScenarioExecutionReportCampaign;

public class ScenarioExecutionReportCampaignMapper {

    public static ScenarioExecutionReportOutlineDto toDto(ScenarioExecutionReportCampaign scenarioReport) {
        return new ScenarioExecutionReportOutlineDto(
            toFrontId(scenarioReport.scenarioId),
            scenarioReport.scenarioName,
            scenarioReport.execution
        );
    }

    public static ScenarioExecutionReportCampaign fromDto(ScenarioExecutionReportOutlineDto dto) {
        return new ScenarioExecutionReportCampaign(
            fromFrontId(of(dto.getScenarioId())),
            dto.getScenarioName(),
            dto.getExecution()
        );
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy