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

com.applitools.eyes.universal.mapper.LayoutBreakpointsMapper Maven / Gradle / Ivy

There is a newer version: 5.76.0
Show newest version
package com.applitools.eyes.universal.mapper;

import com.applitools.eyes.options.LayoutBreakpointsOptions;
import com.applitools.eyes.universal.dto.LayoutBreakpointsDto;

public class LayoutBreakpointsMapper {

    public static LayoutBreakpointsDto toLayoutBreakpointsDto(LayoutBreakpointsOptions layoutBreakpointsOptions) {
        if (layoutBreakpointsOptions == null) {
            return null;
        }

        Object breakpoints = layoutBreakpointsOptions.isLayoutBreakpoints() != null ? layoutBreakpointsOptions.isLayoutBreakpoints() :
                layoutBreakpointsOptions.getLayoutBreakpoints().isEmpty() ? null : layoutBreakpointsOptions.getLayoutBreakpoints();
        if (breakpoints == null) {
            return null;
        }

        LayoutBreakpointsDto dto = new LayoutBreakpointsDto();
        dto.setBreakpoints(breakpoints);
        dto.setReload(layoutBreakpointsOptions.getReload());

        return dto;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy