package effectivejava.chapter6;

import static org.junit.Assert.*;

import org.junit.Test;

public class EnumTests {
	@Test
	public void planetTest() {
		Planet e = Planet.EARTH;
		assertEquals(Planet.EARTH, e);
		assertNotEquals(Planet.MARS, e);
		
		Planet j = Planet.JUPITER;
		
		assertTrue(j.mass() > e.mass());
		assertTrue(j.surfaceWeight(100.0) > 0);
	}
}

@@ -369,15 +369,273 @@
  %3E 0);%0D%0A
+%09%09%0D%0A%09%09System.out.println(%22surface weight of 100 kg%22);%0D%0A%09%09for(Planet x : Planet.values()) %7B%0D%0A%09%09%09final double w = x.surfaceWeight(100.0);%0D%0A%09%09%09assertTrue(w %3E 0);%0D%0A%09%09%09System.out.println(x.name() + %22: weight (N)=%22 + w %0D%0A%09%09%09%09+ %22, weight(lbs)=%22 + (w * .22));%0D%0A%09%09%7D%0D%0A
 %09%7D%0D%0A%7D%0D%0A

test for weights on planets