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

com.github.viclovsky.swagger.coverage.SwaggerCoverageUtils Maven / Gradle / Ivy

The newest version!
package com.github.viclovsky.swagger.coverage;

import java.util.UUID;

import static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_JSON_OUTPUT_FILE_SUFFIX;
import static com.github.viclovsky.swagger.coverage.SwaggerCoverageConstants.COVERAGE_YAML_OUTPUT_FILE_SUFFIX;

public final class SwaggerCoverageUtils {

    SwaggerCoverageUtils() {
        throw new IllegalStateException("Do not instance");
    }

    public static String generateJsonCoverageOutputName() {
        return generateCoverageOutputName(UUID.randomUUID().toString(), COVERAGE_JSON_OUTPUT_FILE_SUFFIX);
    }

    public static String generateYamlCoverageOutputName() {
        return generateCoverageOutputName(UUID.randomUUID().toString(), COVERAGE_YAML_OUTPUT_FILE_SUFFIX);
    }

    private static String generateCoverageOutputName(String uuid, String suffix) {
        return uuid + suffix;
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy