Commit 32773db1 authored by Sebastian Voss's avatar Sebastian Voss
Browse files

small helping method for getting the OutputPort corresponding to a TestOutput

refs 883
parent 8ec976a7
......@@ -28,6 +28,7 @@ import org.fortiss.af3.testing.model.TestCase;
import org.fortiss.af3.testing.model.TestInput;
import org.fortiss.af3.testing.model.TestOutput;
import org.fortiss.af3.testing.model.TestStep;
import org.fortiss.af3.testing.model.TestSuite;
import org.fortiss.af3.testing.model.TestSuiteSpecification;
/**
......@@ -36,7 +37,7 @@ import org.fortiss.af3.testing.model.TestSuiteSpecification;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 44CB42CC2A1B5F9454049A44E769D4FC
* @ConQAT.Rating YELLOW Hash: A3C3A6FA624F06169D834300EAF4AA11
*/
public class TestingUtils {
/**
......@@ -155,4 +156,11 @@ public class TestingUtils {
}
return map;
}
/** Returns the output port corresponding to this test output. */
public static OutputPort getOutputPort(TestOutput to) {
TestSuite suite = to.getTestStep().getTestCase().getTestSuite();
int testOutputIndex = to.getTestStep().getOutputsList().indexOf(to);
return suite.getOutputPorts(testOutputIndex);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment