All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.dagere.peass.dependency.analysis.data.TestExistenceChanges Maven / Gradle / Ivy

There is a newer version: 0.4.0
Show newest version
package de.dagere.peass.dependency.analysis.data;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * Manages data about test existence changes, i.e. tests that are added or removed
 * 
 * @author reichelt
 *
 */
public class TestExistenceChanges {
	
	//Map from dependency (fqn) -> testcase
	private final Map> addedTests = new TreeMap<>();
	private final Set removedTests = new HashSet<>();

	public Map> getAddedTests() {
		return addedTests;
	}

	public Set getRemovedTests() {
		return removedTests;
	}

	public void addRemovedTest(TestCase testcase) {
		removedTests.add(testcase);
	}

	public void addAddedTest(ChangedEntity changedEntity, ChangedEntity testcase) {
		Set testcaseSet = addedTests.get(changedEntity);
		if (testcaseSet == null) {
			testcaseSet = new TreeSet<>();
			addedTests.put(changedEntity, testcaseSet);
		}
		testcaseSet.add(testcase);
		
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy