Search in sources :

Example 1 with Goal

use of org.kanonizo.framework.objects.Goal in project kanonizo by kanonizo.

the class APFDFunction method getGoalMap.

protected Map<Goal, Integer> getGoalMap() {
    Map<Goal, Integer> goalMap = new HashMap<>();
    List<TestCase> testCases = sut.getTestSuite().getTestCases();
    for (int i = 0; i < testCases.size(); i++) {
        final int ind = i;
        TestCase tc = testCases.get(i);
        Set<? extends Goal> goalsCovered = getCoveredGoals(tc);
        goalsCovered.forEach(goal -> {
            if (!goalMap.containsKey(goal)) {
                goalMap.put(goal, ind + 1);
            }
        });
    }
    return goalMap;
}
Also used : Goal(org.kanonizo.framework.objects.Goal) HashMap(java.util.HashMap) TestCase(org.kanonizo.framework.objects.TestCase)

Aggregations

HashMap (java.util.HashMap)1 Goal (org.kanonizo.framework.objects.Goal)1 TestCase (org.kanonizo.framework.objects.TestCase)1