/** TShirtPrices.java tests method tShirtPrice().
 * @author Joel Adams, for Alice+Java
 */

public class TShirtPrices {
	public static void main(String[] args) {
		testTShirtPrice();
		testTShirtToString();
	}
	
	public static void testTShirtPrice() {
		System.out.print("Testing TShirt.getPrice(): ");
		double price = new TShirt("XS").getPrice();
		assert price == 9.00;
		price = new TShirt("S").getPrice();
		assert price == 10.00;
		price = new TShirt("M").getPrice();
		assert price == 10.00;
		price = new TShirt("L").getPrice();
		assert price == 10.00;
		price = new TShirt("XL").getPrice();
		assert price == 11.00;
		System.out.println(" Passed!");
	}
	
	public static void testTShirtToString() {
		System.out.println("Testing TShirt toString()");
		TShirt ts1 = new TShirt("XS");
		System.out.println("-Expecting: XS ($9)");
		System.out.print(  "-Got:       " + ts1 + "\n");
		TShirt ts2 = new TShirt("S");
		System.out.println("-Expecting: S ($10)");
		System.out.print(  "-Got:       " + ts2 + "\n");
		TShirt ts3 = new TShirt("M");
		System.out.println("-Expecting: M ($10)");
		System.out.print(  "-Got:       " + ts3 + "\n");
		TShirt ts4 = new TShirt("L");
		System.out.println("-Expecting: L ($10)");
		System.out.print(  "-Got:       " + ts4 + "\n");
		TShirt ts5 = new TShirt("XL");
		System.out.println("-Expecting: XL ($11)");
		System.out.print(  "-Got:       " + ts5 + "\n");
	}
}
