@Test public void profilePresentButRegionIsEmpty_ProvidesNullRegion() { final BasicProfile profile = new BasicProfile(PROFILE, ImmutableMapParameter .of(ProfileKeyConstants.REGION, "")); final AllProfiles profiles = new AllProfiles(ImmutableMapParameter.of(PROFILE, profile)); stubLoadProfile(profiles); assertNull(regionProvider.getRegion()); }
@Override public String getRegion() throws SdkClientException { File configFile = locationProvider.getLocation(); if (configFile != null && configFile.exists()) { BasicProfile profile = loadProfile(configFile); if (profile != null && !StringUtils.isNullOrEmpty(profile.getRegion())) { return profile.getRegion(); } } return null; }
AwsProfileRegionProvider extends AwsRegionProvider { @Override public String getRegion() throws SdkClientException { File configFile = locationProvider.getLocation(); if (configFile != null && configFile.exists()) { BasicProfile profile = loadProfile(configFile); if (profile != null && !StringUtils.isNullOrEmpty(profile.getRegion())) { return profile.getRegion(); } } return null; } }
AwsProfileRegionProvider extends AwsRegionProvider { @Override public String getRegion() throws SdkClientException { File configFile = locationProvider.getLocation(); if (configFile != null && configFile.exists()) { BasicProfile profile = loadProfile(configFile); if (profile != null && !StringUtils.isNullOrEmpty(profile.getRegion())) { return profile.getRegion(); } } return null; } AwsProfileRegionProvider();  AwsProfileRegionProvider(String profileName); @SdkTestInternalApi  AwsProfileRegionProvider(String profileName, AwsProfileFileLocationProvider locationProvider,
                             BasicProfileConfigLoader configLoader); }
AwsProfileRegionProvider extends AwsRegionProvider { @Override public String getRegion() throws SdkClientException { File configFile = locationProvider.getLocation(); if (configFile != null && configFile.exists()) { BasicProfile profile = loadProfile(configFile); if (profile != null && !StringUtils.isNullOrEmpty(profile.getRegion())) { return profile.getRegion(); } } return null; } AwsProfileRegionProvider();  AwsProfileRegionProvider(String profileName); @SdkTestInternalApi  AwsProfileRegionProvider(String profileName, AwsProfileFileLocationProvider locationProvider,
                             BasicProfileConfigLoader configLoader); @Override String getRegion(); }
AwsProfileRegionProvider extends AwsRegionProvider { @Override public String getRegion() throws SdkClientException { File configFile = locationProvider.getLocation(); if (configFile != null && configFile.exists()) { BasicProfile profile = loadProfile(configFile); if (profile != null && !StringUtils.isNullOrEmpty(profile.getRegion())) { return profile.getRegion(); } } return null; } AwsProfileRegionProvider();  AwsProfileRegionProvider(String profileName); @SdkTestInternalApi  AwsProfileRegionProvider(String profileName, AwsProfileFileLocationProvider locationProvider,
                             BasicProfileConfigLoader configLoader); @Override String getRegion();  }