private void SimplePostTestInner()
{
AutoResetEvent ars = new AutoResetEvent(false);
Exception responseException = new Exception();
VersionStatus status = null;
Client.GetBucketVersioningAsync(new GetBucketVersioningRequest()
{
BucketName = BucketName
}, (response) =>
{
responseException = response.Exception;
if (responseException == null)
{
status = response.Response.VersioningConfig.Status;
}
ars.Set();
}, new AsyncOptions {
ExecuteCallbackOnMainThread = false
});
ars.WaitOne();
Assert.IsNull(responseException);
Assert.AreEqual(VersionStatus.Off, status);
List <S3Object> s3Objects = S3TestUtils.ListObjectsHelper(Client, BucketName);
Assert.IsNotNull(s3Objects);
var count = s3Objects.Count;
var key = string.Format(FileNameFormat, DateTime.Now.Ticks);
S3TestUtils.PostObjectHelper(Client, BucketName, key);
s3Objects = S3TestUtils.ListObjectsHelper(Client, BucketName);
Assert.IsNotNull(s3Objects);
Assert.AreEqual(count + 1, s3Objects.Count);
S3TestUtils.DeleteObjectHelper(Client, BucketName, key);
s3Objects = S3TestUtils.ListObjectsHelper(Client, BucketName);
Assert.IsNotNull(s3Objects);
Assert.AreEqual(count, s3Objects.Count);
}