String environmentValue = profileValueSource.get(ifProfileValue.name()); String[] annotatedValues = ifProfileValue.values(); if (StringUtils.hasLength(ifProfileValue.value())) {
private static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, IfProfileActive ifProfileActive, UnlessProfileActive unlessProfileActive) { if (ifProfileActive == null && unlessProfileActive == null) { return true; } List<String> blacklist = getBlacklist(unlessProfileActive); Set<String> activeProfiles = StringUtils.commaDelimitedListToSet(profileValueSource.get("spring.profiles.active")); boolean enabled = true; if (ifProfileActive != null && StringUtils.hasText(ifProfileActive.value())) { enabled = activeProfiles.contains(ifProfileActive.value()); } for (String profile : blacklist) { if (activeProfiles.contains(profile)) { enabled = false; continue; } } return enabled; }
String environmentValue = profileValueSource.get(ifProfileValue.name()); String[] annotatedValues = ifProfileValue.values(); if (StringUtils.hasLength(ifProfileValue.value())) {
String environmentValue = profileValueSource.get(ifProfileValue.name()); String[] annotatedValues = ifProfileValue.values(); if (StringUtils.hasLength(ifProfileValue.value())) {