Skip to content

Commit e3d40cf

Browse files
committed
fix unit tests
1 parent 3aab384 commit e3d40cf

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

tests/LocalAuthList.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ TEST_CASE( "LocalAuth" ) {
265265

266266
REQUIRE( connector->getStatus() == ChargePointStatus_Available );
267267

268-
unsigned long t_before = mocpp_tick_ms();
269-
270268
beginTransaction("unknownIdTag");
271269
loop();
272270

tests/Reset.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ TEST_CASE( "Reset" ) {
5050
return doc;
5151
});});
5252

53+
getOcppContext()->getOperationRegistry().registerOperation("TransactionEvent", [] () {
54+
return new Ocpp16::CustomOperation("TransactionEvent",
55+
[] (JsonObject) {}, //ignore req
56+
[] () {
57+
//create conf
58+
auto doc = makeJsonDoc("UnitTests", 2 * JSON_OBJECT_SIZE(1));
59+
auto payload = doc->to<JsonObject>();
60+
payload["idTokenInfo"]["status"] = "Accepted";
61+
return doc;
62+
});});
63+
5364
// Register Reset handlers
5465
bool checkNotified [MO_NUM_EVSEID] = {false};
5566
bool checkExecuted [MO_NUM_EVSEID] = {false};

0 commit comments

Comments
 (0)