/* 
 * Mutability Detector
 *
 * Copyright 2009 Graham Allan
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * 		http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.mutabilitydetector.benchmarks.inheritance;


import static org.mutabilitydetector.ImmutableAssert.assertDefinitelyNotImmutable;
import static org.mutabilitydetector.ImmutableAssert.assertImmutable;
import static org.mutabilitydetector.TestUtil.getAnalysisResult;
import static org.mutabilitydetector.TestUtil.getIsImmutableResult;

import org.junit.Test;
import org.mutabilitydetector.benchmarks.types.EnumType;


public class TestSubclassingOfImmutableType {

	@Test
	public void testSupertypeIsDefinitelyNotImmutable() throws Exception {
		assertDefinitelyNotImmutable(getAnalysisResult(MutableSupertype.class));
	}
	
	//@Test TODO replace when InheritedMutabilityChecker works properly.
	public void testImmutableSubtypeIsReportedAsImmutable() throws Exception {
		assertDefinitelyNotImmutable(getIsImmutableResult(ImmutableSubtypeOfMutableSupertype.class));
	}

	
	@Test
	public void testMutableSubtype() throws Exception {
		assertDefinitelyNotImmutable(getIsImmutableResult(MutableSubtypeOfMutableSupertype.class));
	}
	
	@Test
	public void testEnumTypeIsDefinitelyImmutable() throws Exception {
		assertImmutable(getAnalysisResult(EnumType.class));
	}
}

@@ -961,16 +961,41 @@
 esult;%0A%0A
+import org.junit.Ignore;%0A
 import o
@@ -1009,16 +1009,16 @@
 t.Test;%0A
-
 import o
@@ -1117,26 +1117,25 @@
 pe %7B%0A%0A%09@Test
-%0A%09
+ 
 public void 
@@ -1278,34 +1278,17 @@
 %0A%09%0A%09
-//@Test TODO replace when 
+@Ignore(%22
 Inhe
@@ -1314,13 +1314,20 @@
 ker 
+doesn't 
 work
-s
  pro
@@ -1335,11 +1335,23 @@
 erly
-.%0A%09
+ yet.%22)%0A%09@Test 
 publ
@@ -1520,25 +1520,24 @@
 s));%0A%09%7D%0A
-%0A
 %09%0A%09@Test
 %0A%09public
@@ -1520,34 +1520,33 @@
 s));%0A%09%7D%0A%09%0A%09@Test
-%0A%09
+ 
 public void test
@@ -1686,18 +1686,17 @@
 %09%0A%09@Test
-%0A%09
+ 
 public v

Add @Ignore to a test rather than commenting it out.