org.etlunit.TestResultMetricsImpl Maven / Gradle / Ivy
package org.etlunit;
import org.etlunit.parser.ETLTestMethod;
import java.util.HashMap;
import java.util.Map;
public class TestResultMetricsImpl implements TestResultMetrics
{
private int numTests;
private int numPasses;
private int numFailures;
private int numWarnings;
private int numErrors;
private final
Map
statsByTest =
new HashMap();
@Override
public int getNumberOfTestsRun()
{
return numTests;
}
@Override
public int getNumberOfTestsPassed()
{
return numPasses;
}
@Override
public int getNumberOfAssertionFailures()
{
return numFailures;
}
@Override
public int getNumberOfWarnings()
{
return numWarnings;
}
@Override
public int getNumberOfErrors()
{
return numErrors;
}
@Override
public void addStatus(ETLTestMethod method, StatusReporter.CompletionStatus status)
{
numTests++;
statsByTest.put(method.getQualifiedName(), status);
}
@Override
public void addTestsPassed(int num)
{
numPasses += num;
}
@Override
public void addAssertionFailures(int num)
{
numFailures += num;
}
@Override
public void addTestWarnings(int num)
{
numWarnings += num;
}
@Override
public void addErrors(int num)
{
numErrors += num;
}
@Override
public void reset()
{
numTests = 0;
numPasses = 0;
numFailures = 0;
numWarnings = 0;
numErrors = 0;
}
@Override
public Map getResultsMapByTest()
{
return statsByTest;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy