/*
 * (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
 * The Apache License is available at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 */
package io.cloudslang.lang.tools.build.tester;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by stoneo on 4/27/2015.
 **/

/**
 * Holds the results of running the content test cases
 */
public class RunTestsResults {

    private Map<String, TestRun> passedTests;

    private Map<String, TestRun> failedTests;

    private Map<String, TestRun> skippedTests;

    public RunTestsResults(){
        this.passedTests = new HashMap<>();
        this.failedTests = new HashMap<>();
        this.skippedTests = new HashMap<>();
    }

    public Map<String, TestRun> getPassedTests() {
        return passedTests;
    }

    public Map<String, TestRun> getFailedTests() {
        return failedTests;
    }

    public Map<String, TestRun> getSkippedTests() {
        return skippedTests;
    }

    public void addPassedTest(String testCaseName, TestRun testRun){
        passedTests.put(testCaseName, testRun);
    }

    public void addFailedTest(String testCaseName, TestRun testRun){
        failedTests.put(testCaseName, testRun);
    }

    public void addSkippedTest(String testCaseName, TestRun testRun){
        skippedTests.put(testCaseName, testRun);
    }
}

@@ -1503,11 +1503,925 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o)%0A            return true;%0A        if (o == null %7C%7C getClass() != o.getClass())%0A            return false;%0A%0A        RunTestsResults that = (RunTestsResults) o;%0A%0A        if (passedTests != null ? !passedTests.equals(that.passedTests) : that.passedTests != null)%0A            return false;%0A        if (failedTests != null ? !failedTests.equals(that.failedTests) : that.failedTests != null)%0A            return false;%0A        return !(skippedTests != null ? !skippedTests.equals(that.skippedTests) : that.skippedTests != null);%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = passedTests != null ? passedTests.hashCode() : 0;%0A        result = 31 * result + (failedTests != null ? failedTests.hashCode() : 0);%0A        result = 31 * result + (skippedTests != null ? skippedTests.hashCode() : 0);%0A        return result;%0A    %7D
 %0A%7D%0A

Add equals() & hashcode() to RunTestResults