GetAsync() public method

public GetAsync ( string surveyId, string fileName ) : Task
surveyId string
fileName string
return Task
        public void TestGetAsync_Always_ReturnsExpectedResult()
        {
            const string surveyId = "SurveyId";
            const string fileName = "MyFileName";
            var expected = Encoding.UTF8.GetBytes("content");

            var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
            var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);
            mockedHttpClient
                .Setup(client => client.GetAsync(ServiceAddress + "Surveys/" + surveyId + "/MediaFiles/?fileName=" + fileName))
                .Returns(CreateTask(HttpStatusCode.OK, new ByteArrayContent(expected)));

            var target = new NfieldMediaFilesService();
            target.InitializeNfieldConnection(mockedNfieldConnection.Object);

            var task = target.GetAsync(surveyId, fileName);
            task.Wait();
            var actual = task.Result;

            Assert.Equal(expected, actual);
        }