public void CredentialsSet() { SetConfigValues(AccessKeyValue, SecretKeyValue, null, null); var credentials = new AppConfigAWSCredentials().GetCredentials(); Assert.AreEqual(typeof(ImmutableCredentials), credentials.GetType()); Assert.AreEqual(AccessKeyValue, credentials.AccessKey); Assert.AreEqual(SecretKeyValue, credentials.SecretKey); Assert.AreEqual(String.Empty, credentials.Token); }
public void NameSetSessionProfile() { using (var fixture = new SharedCredentialsFileTestFixture()) { var profile = new CredentialProfile(SessionProfileName, SessionProfileOptions); fixture.CredentialsFile.RegisterProfile(profile); SetConfigValues(null, null, SessionProfileName, fixture.CredentialsFile.FilePath); var credentials = new AppConfigAWSCredentials().GetCredentials(); Assert.AreEqual(typeof(ImmutableCredentials), credentials.GetType()); Assert.AreEqual(AccessKeyValue, credentials.AccessKey); Assert.AreEqual(SecretKeyValue, credentials.SecretKey); Assert.AreEqual(TokenValue, credentials.Token); } }