lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
277 stars 126 forks source link

Add Stop to CSMS and CentralSystem #245

Closed rbright closed 11 months ago

rbright commented 1 year ago

While implementing the server and client in my own application, I realized that only the ChargePoint and ChargingStation interfaces exposed a Stop function. As I'd like for the CentralSystem and CSMS to be capable of graceful shutdown when the application stops, I've exposed Stop on those interfaces as well.

lorenzodonini commented 1 year ago

Thanks for contributing! Woud you like to also have a go at writing a simple test for the Stop function? If not, I'll add one at a later point.

rbright commented 1 year ago

@lorenzodonini Sure thing, I'll dig into the CSMS and CentralSystem tests a bit further and make some updates here.

rbright commented 1 year ago

I replicated the mocking and call assertion style that Start used in both the OCPP 1.6 and 2.0.1 test scenarios.

lorenzodonini commented 11 months ago

@rbright thanks a lot for the addition!