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

Make EVSE mockable and add mock #534

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Conversation

christopher-davis-afs
Copy link
Contributor

Describe your changes

This set of changes makes EVSE derived from an interface similar to what we did with ComponentStateManager,
and adds a mock to our set of mocks for v201.

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

@christopher-davis-afs
Copy link
Contributor Author

CC: @shankari

Copy link
Contributor

@Pietfried Pietfried left a comment

Choose a reason for hiding this comment

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

It looks like after a rebase you need to also update

std::map<int32_t, std::unique_ptr<Evse>>& evses;
and
explicit SmartChargingHandler(std::map<int32_t, std::unique_ptr<Evse>>& evses);.

and change the the EvseInterface type

Except for me this looks good!

This commit changes EVSE into an interface that
we can derive from to mock an EVSE.

Signed-off-by: Christopher Davis <150722105+christopher-davis-afs@users.noreply.github.com>
Signed-off-by: Christopher Davis <150722105+christopher-davis-afs@users.noreply.github.com>
@christopher-davis-afs
Copy link
Contributor Author

It looks like after a rebase you need to also update

std::map<int32_t, std::unique_ptr<Evse>>& evses; and explicit SmartChargingHandler(std::map<int32_t, std::unique_ptr<Evse>>& evses);.

and change the the EvseInterface type

Except for me this looks good!

Updated :)

Copy link
Contributor

@Pietfried Pietfried left a comment

Choose a reason for hiding this comment

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

👍

@Pietfried Pietfried merged commit ce79223 into EVerest:main Mar 28, 2024
4 checks passed
@christopher-davis-afs christopher-davis-afs deleted the cdavis/evse-mockable branch April 29, 2024 15:23
@drmrd
Copy link
Collaborator

drmrd commented May 2, 2024

Contributes to #361

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.

None yet

4 participants