Search in sources :

Example 16 with BaseExplainabilityResult

use of org.kie.kogito.explainability.api.BaseExplainabilityResult in project kogito-apps by kiegroup.

the class ExplainabilityResultConsumerTest method testInvalidPayloadUnknownExplanationType.

@Test
void testInvalidPayloadUnknownExplanationType() {
    BaseExplainabilityResult result = new BaseExplainabilityResult() {

        @Override
        public String getExecutionId() {
            return TEST_EXECUTION_ID;
        }
    };
    Message<String> message = mockMessage(buildUnknownExplainabilityCloudEventJsonString(result));
    testNumberOfInvocations(message, 0);
}
Also used : BaseExplainabilityResult(org.kie.kogito.explainability.api.BaseExplainabilityResult) Test(org.junit.jupiter.api.Test)

Aggregations

BaseExplainabilityResult (org.kie.kogito.explainability.api.BaseExplainabilityResult)16 Test (org.junit.jupiter.api.Test)14 Consumer (java.util.function.Consumer)8 Prediction (org.kie.kogito.explainability.model.Prediction)7 CounterfactualExplainabilityResult (org.kie.kogito.explainability.api.CounterfactualExplainabilityResult)6 LIMEExplainabilityResult (org.kie.kogito.explainability.api.LIMEExplainabilityResult)6 BaseExplainabilityRequest (org.kie.kogito.explainability.api.BaseExplainabilityRequest)5 NamedTypedValue (org.kie.kogito.explainability.api.NamedTypedValue)4 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)3 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)3 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)3 BeforeEach (org.junit.jupiter.api.BeforeEach)3 CounterfactualExplainabilityRequest (org.kie.kogito.explainability.api.CounterfactualExplainabilityRequest)3 ExplainabilityStatus (org.kie.kogito.explainability.api.ExplainabilityStatus)3 LIMEExplainabilityRequest (org.kie.kogito.explainability.api.LIMEExplainabilityRequest)3 ModelIdentifier (org.kie.kogito.explainability.api.ModelIdentifier)3 SaliencyModel (org.kie.kogito.explainability.api.SaliencyModel)3 Feature (org.kie.kogito.explainability.model.Feature)3 Output (org.kie.kogito.explainability.model.Output)3 Value (org.kie.kogito.explainability.model.Value)3