Esempio n. 1
0
        protected void GetImagesForVideoReturnsCorrectImage(string imageType)
        {
            Expect.Call(requestHelper.GetResponse(null)).
            IgnoreArguments().
            Constraints(Is.TypeOf <List <string> >()).
            Return(docVideoNormal);
            mocks.ReplayAll();

            IImageService imageService = new AWSImageService(requestHelper);

            IDictionary <string, Image> images = imageService.GetImagesForVideo(movie);
            Image image = images[imageType];

            Assert.AreEqual(testImagesVideo[imageType], image);
        }
Esempio n. 2
0
        private XmlNode GetImageSetNode(List <string> param)
        {
            XmlDocument xmlDoc = requestHelper.GetResponse(param);

            XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);

            nsmgr.AddNamespace("aws", "http://webservices.amazon.com/AWSECommerceService/2010-11-01");

            string xpath = "//aws:Item[1]/aws:ImageSets/aws:ImageSet[@Category='primary']";

            return(xmlDoc.SelectSingleNode(xpath, nsmgr));
        }