// Path: src/main/java/BlueTurtle/warnings/CheckStyleWarning.java
// public class CheckStyleWarning extends Warning {
// 
// 
// 	/**
// 	 * Constructor.
// 	 * 
// 	 * @param filePath
// 	 *            the path to the file where the warning is located.
// 	 * @param filename
// 	 *            the name of the file where the warning is located.
// 	 * @param line
// 	 *            the line number where the warning is located.
// 	 * @param message
// 	 *            the message of the warning.
// 	 * 
// 	 * @param ruleName
// 	 *            the rule name of the warning.
// 	 * @param classification
// 	 *            of the violated rule of the warning.
// 	 */
// 	public CheckStyleWarning(String filePath, String filename, int line, String message, String ruleName, String classification) {
// 		super(filePath, filename, line, "CheckStyle", ruleName, message, classification);
// 		setMessage(message.replaceAll("'", ""));
// 	}
// 
// 	/**
// 	 * Check whether two CheckStyle warnings are the same.
// 	 * 
// 	 * @param other
// 	 *            the other warning.
// 	 * @return a boolean
// 	 */
// 	@Override
// 	public boolean equals(Object other) {
// 
// 		if (!(other instanceof CheckStyleWarning)) {
// 			return false;
// 		}
// 
// 		CheckStyleWarning that = (CheckStyleWarning) other;
// 
// 		// fixed SimplifyBooleanReturn, Conditional logic can be removed.
// 		return (ruleName.equals(that.ruleName) && filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// 				&& message.equals(that.message) && classification.equals(that.classification) && type.equals(that.type));
// 
// 	}
// 
// 	/**
// 	 * HashCode for the CheckStyle Warning.
// 	 */
// 	@Override
// 	public int hashCode() {
// 		return java.util.Objects.hash(filePath, fileName, type, line, message, ruleName, classification);
// 	}
// 	
// 	/**
// 	 * toString method for CheckStylWarning.
// 	 */
// 	@Override
// 	public String toString() {
// 		return "CheckStyleWarning [line=" + line + ", message=" + message + ", classification=" + classification
// 				+ ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath + ", ruleName=" + ruleName
// 				+ "]";
// 	}
// 	
// }


import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertFalse;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.CheckStyleWarning;
import BlueTurtle.warnings.Warning;
package BlueTurtle.summarizers;





/**
 * Test for the PackageSummarizer class.
 * 
 * @author BlueTurtle.
 *
 */
public class PackageSummarizerTest {

	private String packageName;
	private List<Warning> warningList;
	private Warning w;
	private List<Warning> warningList2;
	private Warning w2;
	private String filePath;
	private String filePath2;

	/**
	 * Initialize necessary objects.
	 * 
	 * @throws IOException
	 *             throws an exception if problem was encountered while reading
	 *             files.
	 */
	@Before
	public void initialize() throws IOException {
		ProjectInfoFinder pif = new ProjectInfoFinder();
		pif.findFiles(new File(System.getProperty("user.dir") + "/src/test/resources"));
		filePath = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith(
				"src" + File.separator + "test" + File.separator + "resources" + File.separator + "ExampleClass.java"))
				.findFirst().get();
		filePath2 = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith("src" + File.separator
				+ "test" + File.separator + "resources" + File.separator + "ExampleTestClass.java")).findFirst().get();
		packageName = "SomePackage.subpackage";
// Path: src/main/java/BlueTurtle/warnings/CheckStyleWarning.java
// public class CheckStyleWarning extends Warning {
// 
// 
// 	/**
// 	 * Constructor.
// 	 * 
// 	 * @param filePath
// 	 *            the path to the file where the warning is located.
// 	 * @param filename
// 	 *            the name of the file where the warning is located.
// 	 * @param line
// 	 *            the line number where the warning is located.
// 	 * @param message
// 	 *            the message of the warning.
// 	 * 
// 	 * @param ruleName
// 	 *            the rule name of the warning.
// 	 * @param classification
// 	 *            of the violated rule of the warning.
// 	 */
// 	public CheckStyleWarning(String filePath, String filename, int line, String message, String ruleName, String classification) {
// 		super(filePath, filename, line, "CheckStyle", ruleName, message, classification);
// 		setMessage(message.replaceAll("'", ""));
// 	}
// 
// 	/**
// 	 * Check whether two CheckStyle warnings are the same.
// 	 * 
// 	 * @param other
// 	 *            the other warning.
// 	 * @return a boolean
// 	 */
// 	@Override
// 	public boolean equals(Object other) {
// 
// 		if (!(other instanceof CheckStyleWarning)) {
// 			return false;
// 		}
// 
// 		CheckStyleWarning that = (CheckStyleWarning) other;
// 
// 		// fixed SimplifyBooleanReturn, Conditional logic can be removed.
// 		return (ruleName.equals(that.ruleName) && filePath.equals(that.filePath) && fileName.equals(that.fileName) && line == that.line
// 				&& message.equals(that.message) && classification.equals(that.classification) && type.equals(that.type));
// 
// 	}
// 
// 	/**
// 	 * HashCode for the CheckStyle Warning.
// 	 */
// 	@Override
// 	public int hashCode() {
// 		return java.util.Objects.hash(filePath, fileName, type, line, message, ruleName, classification);
// 	}
// 	
// 	/**
// 	 * toString method for CheckStylWarning.
// 	 */
// 	@Override
// 	public String toString() {
// 		return "CheckStyleWarning [line=" + line + ", message=" + message + ", classification=" + classification
// 				+ ", fileName=" + fileName + ", type=" + type + ", filePath=" + filePath + ", ruleName=" + ruleName
// 				+ "]";
// 	}
// 	
// }


// Path: src/test/java/BlueTurtle/summarizers/PackageSummarizerTest.java
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertFalse;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import BlueTurtle.finders.ProjectInfoFinder;
import BlueTurtle.warnings.CheckStyleWarning;
import BlueTurtle.warnings.Warning;

package BlueTurtle.summarizers;





/**
 * Test for the PackageSummarizer class.
 * 
 * @author BlueTurtle.
 *
 */
public class PackageSummarizerTest {

	private String packageName;
	private List<Warning> warningList;
	private Warning w;
	private List<Warning> warningList2;
	private Warning w2;
	private String filePath;
	private String filePath2;

	/**
	 * Initialize necessary objects.
	 * 
	 * @throws IOException
	 *             throws an exception if problem was encountered while reading
	 *             files.
	 */
	@Before
	public void initialize() throws IOException {
		ProjectInfoFinder pif = new ProjectInfoFinder();
		pif.findFiles(new File(System.getProperty("user.dir") + "/src/test/resources"));
		filePath = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith(
				"src" + File.separator + "test" + File.separator + "resources" + File.separator + "ExampleClass.java"))
				.findFirst().get();
		filePath2 = ProjectInfoFinder.getClassPaths().stream().filter(path -> path.endsWith("src" + File.separator
				+ "test" + File.separator + "resources" + File.separator + "ExampleTestClass.java")).findFirst().get();
		packageName = "SomePackage.subpackage";
		w = new CheckStyleWarning(filePath, "ExampleClass.java", 3, "Test", "TestRule", "Class");