Package com.apps.services

Examples of com.apps.services.AmazonWebService


import com.apps.services.AmazonWebService;

public class AmazonWebServiceFactory {
 
  public static AmazonWebService getAmazonWebService(){
    return new AmazonWebService();
  }
View Full Code Here


      out += "</table>\n";
      out += "</tr>\n";
    }
    for(Iterator<BookInformation> i = biol.iterator(); i.hasNext();){
      BookInformation bio = i.next();
      AmazonWebService aws = AmazonWebServiceFactory.getAmazonWebService();
      AmazonBookModel abm = aws.search(bio.getISBN());
      out += "<tr>\n";
      out += "<table>\n";
      if (!abm.getAsin().equals("")) {
        out += "<tr>\n";
        out += "<a href=\"" + abm.getDetailUrl() + "\">Amazon</a>";
View Full Code Here

public class AmazonWebServiceTest {

  @Test
  public void test() {
    AmazonWebService aws = AmazonWebServiceFactory.getAmazonWebService();
    AmazonBookModel abm = aws.search("9780495391326");
   
    assertTrue(abm.getAsin().equals("0495391328"));
    assertTrue(abm.getDetailUrl().equals("http://www.amazon.ca/Discrete-Mathematics-Applications-Susanna-Epp/dp/0495391328%3FSubscriptionId%3DAKIAI2EIYYQQFCWV6XCA%26tag%3Dubcoco03-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0495391328"));
    assertTrue(abm.getImageUrl().equals("http://ecx.images-amazon.com/images/I/41BEcqUOPbL._SL75_.jpg"));
    assertTrue(abm.getPriceNew().equals("CDN$ 172.33"));
View Full Code Here

TOP

Related Classes of com.apps.services.AmazonWebService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.