Coverage Report - org.paneris.bibliomania.Product
 
Classes in this File Line Coverage Branch Coverage Complexity
Product
0%
0/10
0%
0/4
1.667
 
 1  
 package org.paneris.bibliomania;
 2  
 
 3  
 import java.io.File;
 4  
 import java.text.NumberFormat;
 5  
 import java.util.Locale;
 6  
 
 7  
 import org.paneris.bibliomania.generated.ProductBase;
 8  
 
 9  
 public class Product extends ProductBase {
 10  0
   public Product() {}
 11  
 
 12  
   // programmer's domain-specific code here
 13  
 
 14  
   /* format a number in the locale currency
 15  
   */
 16  
   public String displayPrice() {
 17  0
     return new String(NumberFormat.getCurrencyInstance(Locale.UK).
 18  
                       format(getPrice().doubleValue()));
 19  
   } 
 20  
   
 21  
   public String getPictureWithUrl() {
 22  0
     String url = "";
 23  0
     String uploadURL = ((BibliomaniaDatabase)getDatabase()).getUploadURL();
 24  0
     if (uploadURL != null) url += uploadURL;
 25  0
     if (getBook() != null) { 
 26  0
       StringBuffer s = new StringBuffer();
 27  0
       getBook().appendCacheSubpath(s);
 28  0
       url += s.toString();
 29  
     }
 30  0
     return url + File.separatorChar + getPicture();
 31  
   }
 32  
  
 33  
 }