public void DeleteObject_Should_Succeed()
{
// Get the client details from the stored client details (rather than embed secret keys in the test).
// Ensure that your AWS/Secret keys have been stored before running.
var store = new ClientDetailsStore();
AwsClientDetails clientDetails = store.Load(Container);
S3Helper helper = new S3Helper(clientDetails);
const string bucketName = "ExampleTestBucket";
const string key = "ExampleObject";
// Put a simple text object into the bucket to delete.
helper.CreateBucket(bucketName);
helper.PutTextObject(bucketName, key, "Example text to store in the object");
try
{
helper.DeleteObject(bucketName, key);
}
finally
{
helper.DeleteBucket(bucketName);
}
}