Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: The invocation of a non-existing function returns null #692

Merged
merged 9 commits into from
Jul 25, 2023

Commits on Jul 24, 2023

  1. test: Adjust expected behavior of function invocation

    If a function is invoked with wrong parameter, the invocation should return null (instead of failing the evaluation).
    saig0 committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    bcd43ec View commit details
    Browse the repository at this point in the history
  2. feat: Return null on function invocation

    A function invocation returns null if the function is invoked with wrong parameters, or no function exists with this name.
    saig0 committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    10aae21 View commit details
    Browse the repository at this point in the history
  3. refactor: Rename test cases

    Change the name of some test cases to bring the focus on the invocation of functions.
    saig0 committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    902239b View commit details
    Browse the repository at this point in the history
  4. test: New test case for function invocation

    Add new test cases for a function invocation that return null.
    saig0 committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    f866321 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2023

  1. test: Verify reported failures

    If a function invocation returns null, we want to verify that a failure is reported.
    
    A user of the API can access the evaluation failures to understand why an evaluation returned null. So, we should verify the reported failures.
    
    To verify the failures, we need a new base test class that returns the whole evaluation result, instead of only the return value. Create a new test matcher to increase the readability of the tests and better failure messages.
    saig0 committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    70bca2f View commit details
    Browse the repository at this point in the history
  2. refactor: Use evaluation result matcher in test

    Migrate the test class from FeelIntegrationTest to FeelEngineTest. The new base test class allows using the EvaluationResultMatchers that can check for reported failures and produces better failure messages.
    saig0 committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    d2ca767 View commit details
    Browse the repository at this point in the history
  3. refactor: Replace internal test methods

    Replace the internal test methods by using FeelEngineTest and EvaluationResultMatchers.
    saig0 committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    b79573d View commit details
    Browse the repository at this point in the history
  4. refactor: Align failure message

    Align the failure message if no function was found.
    saig0 committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    0260126 View commit details
    Browse the repository at this point in the history
  5. refactor: Move test case

    Move test case from SuppressedFailuresTest to InterpreterFunctionTest that bundles all function related test cases.
    
    Remove test cases from SuppressedFailuresTest that are already covered in InterpreterFunctionTest.
    saig0 committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    133dc8f View commit details
    Browse the repository at this point in the history