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

Adding a few unit tests for the EvseV2G module #1013

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

SebaLukas
Copy link
Contributor

Describe your changes

Adding a few unit tests for the EvseV2G module. This should serve as a starting point for further tests.

Issue ticket number and link

The EvseV2G module has hardly any unit tests. Nevertheless, it should be possible to test certain parts of the code, such as the DIN/ISO-2 state machine, using unit tests. The first task was to find out how easy or difficult it is to add unit tests for the DIN state machine.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

Copy link
Contributor

@james-ctc james-ctc left a comment

Choose a reason for hiding this comment

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

Looks good to me.
A squashed commit would work well.

…a starting point for further tests:

- First din_server unit test prototype
- adds handle_din_contract_authentication tests
- adds handle_din_contract_authentication tests
- fix: added missing functions to module adapter stub
- Declaring exiDocument, v2g_connection & v2g_context as test class members and adding them to SetUp(). Adding some potential test cases for session setup. Adding a first not complete din service discovery test
- feat: added collecting logs for EvseV2G tests for unit tests
- fix: EvseV2G test now uses unique pointer to ensure clean structures for every test
- Updating and adding session_setup state test
- feat: added first testcases for din_validate_response_code
- din_validate_response_code_DIN_tests
- feat: added remainig testcases for din_validate_response_code
- fix: created a quiet module adapter stub, fix: removed TODO that has been addressed, feat: added some tests around v2g_context
- feat: add test file for sdp
- Adding first sdp write header test

Signed-off-by: Sebastian Lukas <[email protected]>
Co-authored-by: MarzellT <[email protected]>
Co-authored-by: James Chapman <[email protected]>
Co-authored-by: Anton Kadelbach <[email protected]>
@SebaLukas SebaLukas force-pushed the feat/evsev2g_testing branch from fcc1da9 to 326434b Compare January 22, 2025 08:08
@SebaLukas SebaLukas merged commit 356a4cd into main Jan 22, 2025
11 of 12 checks passed
@SebaLukas SebaLukas deleted the feat/evsev2g_testing branch January 22, 2025 09:21
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.

3 participants