/** SphereTester.java provides simple unit tests for the methods in class Sphere.
 * @author Joel Adams, for Alice+Java.
 */

public class SphereTester {
	public static void main(String[] args) {
		testVolume();
	}

	public static void testVolume() {
		System.out.print("Testing Sphere.volume(): ");
		double volume = Sphere.volume(1.0);
		assert volume == 4.0 / 3.0 * Math.PI;
		System.out.print(" 1 ");
		volume = Sphere.volume(2.0);
		assert volume == 4.0 / 3.0 * Math.PI * 8.0;
		System.out.print(" 2 ");
		volume = Sphere.volume(3.0);
		assert volume == 4.0 / 3.0 * Math.PI * 27.0;
		System.out.print(" 3 ");
		volume = Sphere.volume(4.0);
		assert volume == 4.0 / 3.0 * Math.PI * 64.0;
		System.out.print(" 4 ");
		System.out.println(" Passed!");
	}
}