コード例 #1
0
        public async Task TryExtensions()
        {
            (FakeNetworkDriver driver, S3Client client) = StaticClientHelper.CreateFakeClient();

            Assert.True((await client.GetObjectAsync("testbucket", "GetDataAsync").ConfigureAwait(false)).IsSuccess);
            Assert.Equal("https://s3.us-east-1.amazonaws.com/testbucket/GetDataAsync", driver.SendResource);
        }
コード例 #2
0
        public async Task StaticClient()
        {
            (FakeNetworkDriver driver, S3Client client) = StaticClientHelper.CreateFakeClient();

            await client.PutObjectStringAsync("testbucket", "PutAsync", "data").ConfigureAwait(false);

            Assert.Equal("https://s3.us-east-1.amazonaws.com/testbucket/PutAsync", driver.SendResource);

            await client.GetObjectAsync("testbucket", "GetObjectAsync").ConfigureAwait(false);

            Assert.Equal("https://s3.us-east-1.amazonaws.com/testbucket/GetObjectAsync", driver.SendResource);
        }