package ru.otus.mobile.config;

public enum TestEmulator {
    EMULATOR_1("android-emulator-1", 4723, "Android Emulator"),
    EMULATOR_2("android-emulator-2", 4725, "Android Emulator");

    private final String id;
    private final int appiumPort;
    private final String deviceName;

    TestEmulator(String id, int appiumPort, String deviceName) {
        this.id = id;
        this.appiumPort = appiumPort;
        this.deviceName = deviceName;
    }

    public MobileConfig.Emulator toEmulator(String appiumHost, String appUrl) {
        return new MobileConfig.Emulator(
                id,
                "http://" + appiumHost + ":" + appiumPort,
                deviceName,
                appUrl
        );
    }
}
