X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api.slc%2Fsrc%2Forg%2Fargeo%2Fapi%2Fslc%2Ftest%2FIncompatibleTestDataException.java;fp=org.argeo.api.slc%2Fsrc%2Forg%2Fargeo%2Fapi%2Fslc%2Ftest%2FIncompatibleTestDataException.java;h=fdced669d02756e9039844df7d0510fdcac477cd;hb=d07cf3c7dfdeafa2b1efafe547b54d56a8b52ced;hp=0000000000000000000000000000000000000000;hpb=8596685647867307b862b8a89742b6a62ba75fcd;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/test/IncompatibleTestDataException.java b/org.argeo.api.slc/src/org/argeo/api/slc/test/IncompatibleTestDataException.java new file mode 100644 index 000000000..fdced669d --- /dev/null +++ b/org.argeo.api.slc/src/org/argeo/api/slc/test/IncompatibleTestDataException.java @@ -0,0 +1,24 @@ +package org.argeo.api.slc.test; + +import org.argeo.api.slc.SlcException; + +/** + * Exception to throw when a test definition cannot interpret the provided test + * data. + */ +public class IncompatibleTestDataException extends SlcException { + static final long serialVersionUID = 1l; + + public IncompatibleTestDataException(TestData testData, + TestDefinition testDefinition) { + super("TestData " + testData.getClass() + + " is not compatible with TestDefinition " + + testDefinition.getClass()); + } + + public IncompatibleTestDataException(TestRun testRun) { + super("TestData " + ((TestData) testRun.getTestData()).getClass() + + " is not compatible with TestDefinition " + + ((TestDefinition) testRun.getTestDefinition()).getClass()); + } +}