Advertisement
Guest User

TestCalcprice.java

a guest
May 6th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. package backend.test;
  2.  
  3. import backend.CalcPrice;
  4. import frontend.Priceprint;
  5. import java.util.Hashtable;
  6.  
  7. public class TestCalcprice {
  8.         public static void main(String[] args) {
  9.                 System.out.println("I test CalcPrice, but I also test Printprice(Hashtable, Hashtable, String).");
  10.  
  11.                 Hashtable<String, Double> d = new Hashtable<String, Double>(7);
  12.                 Hashtable<String, Double> b;
  13.                 CalcPrice c;
  14.  
  15.                 d.put("exchange", 127.23);
  16.                 d.put("special", 0.2);
  17.                 d.put("hosting", 10.0);
  18.                 d.put("shells", 5.0);
  19.                 d.put("privacy", 2.0);
  20.                 d.put("quotahdd", 5.0);
  21.                 d.put("quotaband", 1.5);
  22.  
  23.                 c = new CalcPrice(d);
  24.                 b = new Hashtable<String, Double>(c.getBitcoinPrices());
  25.                 Priceprint p = new Priceprint(b, d, "for unit test, check with calculator");
  26.         }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement