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

io.dekorate.testing.openshift.adapter.OpenshiftIntegrationTestConfigAdapter Maven / Gradle / Ivy

There is a newer version: 4.1.4
Show newest version
package io.dekorate.testing.openshift.adapter;

import io.dekorate.testing.openshift.config.OpenshiftIntegrationTestConfig;
import io.dekorate.testing.openshift.config.OpenshiftIntegrationTestConfigBuilder;
import java.util.Map;
import io.dekorate.testing.openshift.annotation.OpenshiftIntegrationTest;

public class OpenshiftIntegrationTestConfigAdapter{



    public static OpenshiftIntegrationTestConfig adapt(OpenshiftIntegrationTest instance){
            return newBuilder(instance).build();
    }

    public static OpenshiftIntegrationTestConfigBuilder newBuilder(OpenshiftIntegrationTest instance){
            return new OpenshiftIntegrationTestConfigBuilder(new io.dekorate.testing.openshift.config.OpenshiftIntegrationTestConfig(instance.deployEnabled(),
            instance.buildEnabled(),
            instance.imageStreamTagTimeout(),
            instance.readinessTimeout()));
    }

    public static OpenshiftIntegrationTestConfig adapt(Map map){
            return new io.dekorate.testing.openshift.config.OpenshiftIntegrationTestConfig(
               Boolean.parseBoolean(String.valueOf(map instanceof Map ? ((Map)map).getOrDefault("deployEnabled","true") : "true")),
               Boolean.parseBoolean(String.valueOf(map instanceof Map ? ((Map)map).getOrDefault("buildEnabled","true") : "true")),
               Long.parseLong(String.valueOf(map instanceof Map ? ((Map)map).getOrDefault("imageStreamTagTimeout","120000") : "120000")),
               Long.parseLong(String.valueOf(map instanceof Map ? ((Map)map).getOrDefault("readinessTimeout","300000") : "300000")));
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy