Skip to content

Commit

Permalink
chore: prep
Browse files Browse the repository at this point in the history
  • Loading branch information
sr4850 committed Oct 23, 2024
1 parent 1ebcd94 commit 690e6a4
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum EnvironmentType {
DEVELOP("dev"),
REGRESSION("reg"),
INTEGRATION("int"),
PREPRODUCTION("pre"),
PREPRODUCTION("prep"),
PRODUCTION("prod"),
LOCAL("local");

Expand All @@ -24,10 +24,8 @@ public enum EnvironmentType {

public static EnvironmentType getEnum(@NotNull String env) {
EnvironmentType envEnum;

switch (env.toLowerCase()) {
case "qa":
case "int":
envEnum = EnvironmentType.QUALITY_ASSURANCE;
break;
case "dev":
Expand All @@ -36,10 +34,12 @@ public static EnvironmentType getEnum(@NotNull String env) {
case "da":
envEnum = EnvironmentType.DAILY_ASSURANCE;
break;
case "int":
envEnum = EnvironmentType.INTEGRATION;
break;
case "reg":
envEnum = EnvironmentType.REGRESSION;
break;
case "pre":
case "prep":
envEnum = EnvironmentType.PREPRODUCTION;
break;
Expand All @@ -60,9 +60,9 @@ public static EnvironmentType getEnum(@NotNull String env) {
}
return envEnum;
}

public static String name(@NotNull ApplicationType appType, @NotNull EnvironmentType env) {
String name;

switch (env) {
case QUALITY_ASSURANCE:
name = "qa";
Expand All @@ -83,7 +83,7 @@ public static String name(@NotNull ApplicationType appType, @NotNull Environment
name = "prodsupp";
break;
case PREPRODUCTION:
name = "pre";
name = "prep";
break;
case DEMO:
name = "demo";
Expand All @@ -104,6 +104,7 @@ public static String name(@NotNull ApplicationType appType, @NotNull Environment

return name;
}

@Override
public final String toString() {
return this.name;
Expand Down

0 comments on commit 690e6a4

Please sign in to comment.