コード例 #1
0
        public async Task GetFileScenarioTest(string shareName, string fileName, FileProperties properties,
                                              HttpStatusCode?expectedError)
        {
            HttpRequestMessage request = FileTests.GetFileRequest(FileContext, shareName, fileName, null);

            Assert.IsTrue(request != null, "Failed to create HttpRequestMessage");
            HttpResponseMessage response = await FileTestUtils.GetResponse(request, FileContext);

            try
            {
                FileTests.GetFileResponse(response, FileContext, properties, expectedError);
            }
            finally
            {
                response.Dispose();
            }
        }