/* 
 * 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;

import java.util.Collection;

import org.mutabilitydetector.IAnalysisSession.AnalysisResult;
import org.mutabilitydetector.IAnalysisSession.IsImmutable;
import org.mutabilitydetector.unittesting.MutabilityAssert;

public class TestUtil {
	public static IsImmutable getIsImmutableResult(Class<?> toAnalyse) {
		IsImmutable result = new AnalysisSession().isImmutable(toAnalyse.getName());
		return result;
	}
	
	public static AnalysisResult getAnalysisResult(Class<?> toAnalyse) {
		return new AnalysisSession().resultFor(toAnalyse.getName());
	}
	
	public static String formatReasons(Collection<CheckerReasonDetail> reasons) {
		return MutabilityAssert.formatReasons(reasons);
	}
}

@@ -650,16 +650,137 @@
 ector;%0A%0A
+import static java.util.Arrays.asList;%0Aimport static org.mutabilitydetector.MutabilityReason.PUBLISHED_NON_FINAL_FIELD;%0A%0A
 import j
@@ -1449,11 +1449,211 @@
 ons);%0A%09%7D
+%0A%0A%09public static Collection%3CCheckerReasonDetail%3E unusedCheckerReasonDetails() %7B%0A%09%09return asList(new CheckerReasonDetail(%22this reason is not meant to be involved%22, null, PUBLISHED_NON_FINAL_FIELD));%0A%09%7D
 %0A%7D%0A

Add method for creating a list of unused CheckerReasonDetails to TestUtil.