Пример #1
0
        public void WhenIRequestForAnyImageToBeDownloaded()
        {
            var client = ScenarioCredentialsHelper.GetCredentials();

            var request = client.Download().Image().WithId("464423888");

            FileType filetype;

            ScenarioContext.Current.TryGetValue("filetype", out filetype);

            if (!filetype.Equals(FileType.None))
            {
                request = request.WithFileType(filetype);
            }

            int height;

            ScenarioContext.Current.TryGetValue("height", out height);
            if (height > 0)
            {
                request = request.WithHeight(height);
            }

            var task = request.ExecuteAsync();

            ScenarioContext.Current.Set(task);
        }
Пример #2
0
        public void GivenIHaveAListOfImageIdsIWantDetailsOn()
        {
            var idList = new List <string> {
                "452777084", "139839264", "477174619"
            };

            ScenarioContext.Current.Add("request",
                                        ScenarioCredentialsHelper.GetCredentials().Images().WithIds(idList));
            ScenarioContext.Current.Add("imageids", idList);

            ScenarioContext.Current.Get <Images>("request").WithResponseField("title");
        }
Пример #3
0
 public void WhenIConfigureMySearchForBlendedImages()
 {
     ScenarioContext.Current.Set(
         ScenarioCredentialsHelper.GetCredentials().Search().Images(), "request");
 }
Пример #4
0
 public void GivenIHaveAnImageIdIWantDetailsOn()
 {
     ScenarioContext.Current.Add("request",
                                 ScenarioCredentialsHelper.GetCredentials().Images().WithId("452777084"));
     ScenarioContext.Current.Add("imageid", "452777084");
 }
Пример #5
0
        public void WhenIAskTheSdkForAnAuthenticationToken()
        {
            var client = ScenarioCredentialsHelper.GetCredentials();

            ScenarioContext.Current.Add("task", client.GetAccessToken());
        }