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

Add unit test #42

Merged
merged 19 commits into from
Sep 18, 2024
Merged

Add unit test #42

merged 19 commits into from
Sep 18, 2024

Conversation

rpanackal
Copy link
Member

@rpanackal rpanackal commented Sep 2, 2024

Context

AI/ai-sdk-java-backlog#37.

Add unit test for all commonly used methods for valid response cases.

Feature scope:

  • Unit tests for Artifact, Configuration, Deployment, Execution, Scenario APIs

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

Roshin Rajan Panackal added 5 commits August 22, 2024 15:28
- Remove unneccesary isNotNull assertions
- Rename test methods
# Conflicts:
#	core/src/test/java/com/sap/ai/sdk/core/client/ArtifactUnitTest.java
#	core/src/test/java/com/sap/ai/sdk/core/client/ConfigurationUnitTest.java
#	core/src/test/java/com/sap/ai/sdk/core/client/DeploymentUnitTest.java
#	core/src/test/java/com/sap/ai/sdk/core/client/ExecutionUnitTest.java
#	core/src/test/java/com/sap/ai/sdk/core/client/ScenarioUnitTest.java
@rpanackal rpanackal requested a review from newtork September 12, 2024 11:52
Copy link
Contributor

@CharlesDuboisSAP CharlesDuboisSAP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing unit tests, this should be written as a comment on the backlog item

  • Artifact:
    • count
  • Configuration:
    • get by ID
    • count
  • Deployment and Execution:
    • patch all
    • logs
  • Scenario:
    • get by ID
    • available models

assertThat(execution.getConfigurationName()).isEqualTo("i749902_exec_conf");
assertThat(execution.getCreatedAt()).isEqualTo("2024-09-09T19:09:57Z");
// executableId is not in the generated client.
assertThat(execution.getCustomField("executableId")).isEqualTo("wt-spam-detection-i749902");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should report to AI Core that they have the field executionScheduleId instead of executableId

Roshin Rajan Panackal added 2 commits September 18, 2024 16:09
# Conflicts:
#	core/src/test/java/com/sap/ai/sdk/core/client/ExecutionUnitTest.java
@rpanackal rpanackal merged commit 963273d into main Sep 18, 2024
5 checks passed
@rpanackal rpanackal deleted the add-unit-test branch September 18, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants