Package dev.cel.expr.conformance.test
Interface TestCaseOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
TestCase,TestCase.Builder
public interface TestCaseOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsInput(String key) A map representing a variable binding where the key is the name of the input variable.If specified validates that the deduced type at check time matches If the result kind is not set and this field is set, the test is considered "check-only".If specified validates that the deduced type at check time matches If the result kind is not set and this field is set, the test is considered "check-only".A description of the test.com.google.protobuf.ByteStringA description of the test.booleanBypass the type-checking and only attempt to evaluate the parsed expression.getEnv()Serialized environment to be used for compilation and evaluation of the CEL expression for the current test case.Serialized environment to be used for compilation and evaluation of the CEL expression for the current test case.getExpr()The text of the CEL expression.com.google.protobuf.ByteStringThe text of the CEL expression.getInput()Deprecated.Input in the form of a context proto for the test case.Input in the form of a context proto for the test case.intA map representing a variable binding where the key is the name of the input variable.A map representing a variable binding where the key is the name of the input variable.getInputOrDefault(String key, InputValue defaultValue) A map representing a variable binding where the key is the name of the input variable.getInputOrThrow(String key) A map representing a variable binding where the key is the name of the input variable.getName()Name of the test case.com.google.protobuf.ByteStringName of the test case.Expected result of the test case.Expected result of the test case.booleanIf specified validates that the deduced type at check time matches If the result kind is not set and this field is set, the test is considered "check-only".booleanhasEnv()Serialized environment to be used for compilation and evaluation of the CEL expression for the current test case.booleanInput in the form of a context proto for the test case.booleanExpected result of the test case.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getName
String getName()Name of the test case.
string name = 1;- Returns:
- The name.
-
getNameBytes
com.google.protobuf.ByteString getNameBytes()Name of the test case.
string name = 1;- Returns:
- The bytes for name.
-
getDescription
String getDescription()A description of the test.
string description = 2;- Returns:
- The description.
-
getDescriptionBytes
com.google.protobuf.ByteString getDescriptionBytes()A description of the test.
string description = 2;- Returns:
- The bytes for description.
-
getExpr
String getExpr()The text of the CEL expression.
string expr = 3;- Returns:
- The expr.
-
getExprBytes
com.google.protobuf.ByteString getExprBytes()The text of the CEL expression.
string expr = 3;- Returns:
- The bytes for expr.
-
hasEnv
boolean hasEnv()Serialized environment to be used for compilation and evaluation of the CEL expression for the current test case. This option allows validating the same expression against multiple environments.
.cel.expr.conformance.Environment env = 4;- Returns:
- Whether the env field is set.
-
getEnv
Environment getEnv()Serialized environment to be used for compilation and evaluation of the CEL expression for the current test case. This option allows validating the same expression against multiple environments.
.cel.expr.conformance.Environment env = 4;- Returns:
- The env.
-
getEnvOrBuilder
EnvironmentOrBuilder getEnvOrBuilder()Serialized environment to be used for compilation and evaluation of the CEL expression for the current test case. This option allows validating the same expression against multiple environments.
.cel.expr.conformance.Environment env = 4; -
getInputCount
int getInputCount()A map representing a variable binding where the key is the name of the input variable.
map<string, .cel.expr.conformance.test.InputValue> input = 5; -
containsInput
A map representing a variable binding where the key is the name of the input variable.
map<string, .cel.expr.conformance.test.InputValue> input = 5; -
getInput
Deprecated.UsegetInputMap()instead. -
getInputMap
Map<String,InputValue> getInputMap()A map representing a variable binding where the key is the name of the input variable.
map<string, .cel.expr.conformance.test.InputValue> input = 5; -
getInputOrDefault
A map representing a variable binding where the key is the name of the input variable.
map<string, .cel.expr.conformance.test.InputValue> input = 5; -
getInputOrThrow
A map representing a variable binding where the key is the name of the input variable.
map<string, .cel.expr.conformance.test.InputValue> input = 5; -
hasInputContext
boolean hasInputContext()Input in the form of a context proto for the test case. Note: Only one of `input_bindings` and `input_context` can be provided. Providing both should result in an error.
.cel.expr.conformance.test.InputContext input_context = 6;- Returns:
- Whether the inputContext field is set.
-
getInputContext
InputContext getInputContext()Input in the form of a context proto for the test case. Note: Only one of `input_bindings` and `input_context` can be provided. Providing both should result in an error.
.cel.expr.conformance.test.InputContext input_context = 6;- Returns:
- The inputContext.
-
getInputContextOrBuilder
InputContextOrBuilder getInputContextOrBuilder()Input in the form of a context proto for the test case. Note: Only one of `input_bindings` and `input_context` can be provided. Providing both should result in an error.
.cel.expr.conformance.test.InputContext input_context = 6; -
hasOutput
boolean hasOutput()Expected result of the test case.
.cel.expr.conformance.test.TestOutput output = 7;- Returns:
- Whether the output field is set.
-
getOutput
TestOutput getOutput()Expected result of the test case.
.cel.expr.conformance.test.TestOutput output = 7;- Returns:
- The output.
-
getOutputOrBuilder
TestOutputOrBuilder getOutputOrBuilder()Expected result of the test case.
.cel.expr.conformance.test.TestOutput output = 7; -
hasDeducedType
boolean hasDeducedType()If specified validates that the deduced type at check time matches If the result kind is not set and this field is set, the test is considered "check-only".
.cel.expr.Type deduced_type = 8;- Returns:
- Whether the deducedType field is set.
-
getDeducedType
Type getDeducedType()If specified validates that the deduced type at check time matches If the result kind is not set and this field is set, the test is considered "check-only".
.cel.expr.Type deduced_type = 8;- Returns:
- The deducedType.
-
getDeducedTypeOrBuilder
TypeOrBuilder getDeducedTypeOrBuilder()If specified validates that the deduced type at check time matches If the result kind is not set and this field is set, the test is considered "check-only".
.cel.expr.Type deduced_type = 8; -
getDisableCheck
boolean getDisableCheck()Bypass the type-checking and only attempt to evaluate the parsed expression.
bool disable_check = 9;- Returns:
- The disableCheck.
-