
public class Tests {
	public static void main(String[] args) {
		testTShirt();
	}
	
	public static void testTShirt() {
		System.out.print("Testing TShirt ");
		TShirt shirt = new TShirt("S");
		assert shirt.getSize().equals("S");
		assert shirt.getPrice() == 10.0;
		shirt = new TShirt("M");
		assert shirt.getSize().equals("M");
		assert shirt.getPrice() == 10.0;
		shirt = new TShirt("L");
		assert shirt.getSize().equals("L");
		assert shirt.getPrice() == 10.0;
		shirt = new TShirt("XS");
		assert shirt.getSize().equals("XS");
		assert shirt.getPrice() == 10.0;
		shirt = new TShirt("XL");
		assert shirt.getSize().equals("XL");
		assert shirt.getPrice() == 10.0;
		
		shirt = new XSmallTShirt();
		assert shirt.getSize().equals("XS");
		assert shirt.getPrice() == 9.0;
		
		shirt = new SmallTShirt();           // shirt is a TShirt handle
		assert shirt.getSize().equals("S");
		assert shirt.getPrice() == 10.0;
		
		shirt = new XLargeTShirt();
		assert shirt.getSize().equals("XL");
		assert shirt.getPrice() == 11.0;

		System.out.println(" - passed!");
	}

}
