public void ReadSessionProfile() { using (var tester = new SharedCredentialsFileTester(SessionProfileText)) { tester.AssertReadProfile("session_profile", SessionCredentials); } }
public void ReadBasicProfile() { using (var tester = new SharedCredentialsFileTester(BasicProfileText)) { tester.AssertReadProfile("basic_profile", BasicCredentials); } }
public void WriteBasicProfile() { using (var tester = new SharedCredentialsFileTester()) { tester.AssertWriteProfile("basic_profile", BasicCredentials, BasicProfileText); } }
public void WriteSessionProfile() { using (var tester = new SharedCredentialsFileTester()) { tester.AssertWriteProfile("session_profile", SessionCredentials, SessionProfileText); } }
public void ReadSessionProfile() { using (var tester = new SharedCredentialsFileTester(SessionProfileText)) { tester.AssertReadProfile("session_profile", SessionCredentials); } }
public void WriteBasicProfile() { using (var tester = new SharedCredentialsFileTester()) { tester.AssertWriteProfile("basic_profile", BasicCredentials, BasicProfileText); } }
public void ReadBasicProfile() { using (var tester = new SharedCredentialsFileTester(BasicProfileText)) { tester.AssertReadProfile("basic_profile", BasicCredentials); } }
public void DeleteProfile() { using (var tester = new SharedCredentialsFileTester(SessionProfileText + Environment.NewLine + BasicProfileText)) { tester.CredentialsFile.DeleteProfile("session_profile"); tester.CredentialsFile.Persist(); tester.AssertFileContents(BasicProfileText); } }
public void ReadInvalidNoAccessKeyProfile() { using (var tester = new SharedCredentialsFileTester(InvalidNoAccessKeyProfileText)) { AssertExtensions.ExpectException(() => { tester.AssertReadProfile("invalid_profile", null); }, typeof(InvalidDataException), String.Format(ErrorFormat, "invalid_profile")); } }
public void UpdateProfile() { using (var tester = new SharedCredentialsFileTester(SessionProfileText)) { var newToken = Guid.NewGuid().ToString(); ImmutableCredentials updatedCredentials = new ImmutableCredentials( SessionCredentials.AccessKey, SessionCredentials.SecretKey, newToken); tester.AssertWriteProfile("session_profile", updatedCredentials, SessionProfileText.Replace("session_aws_session_token", newToken)); } }
public void ReadInvalidNoAccessKeyProfile() { using (var tester = new SharedCredentialsFileTester(InvalidNoAccessKeyProfileText)) { AssertExtensions.ExpectException(() => { tester.AssertReadProfile("invalid_profile", null); }, typeof(InvalidDataException), String.Format(ErrorFormat, "invalid_profile")); } }
public void WriteSessionProfile() { using (var tester = new SharedCredentialsFileTester()) { tester.AssertWriteProfile("session_profile", SessionCredentials, SessionProfileText); } }
public void DeleteProfile() { using (var tester = new SharedCredentialsFileTester(SessionProfileText + Environment.NewLine + BasicProfileText)) { tester.CredentialsFile.DeleteProfile("session_profile"); tester.CredentialsFile.Persist(); tester.AssertFileContents(BasicProfileText); } }
public void UpdateProfile() { using (var tester = new SharedCredentialsFileTester(SessionProfileText)) { var newToken = Guid.NewGuid().ToString(); ImmutableCredentials updatedCredentials = new ImmutableCredentials( SessionCredentials.AccessKey, SessionCredentials.SecretKey, newToken); tester.AssertWriteProfile("session_profile", updatedCredentials, SessionProfileText.Replace("session_aws_session_token", newToken)); } }