FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MicroOcpp/tests/Security.cpp at main · matth-x/MicroOcpp · GitHub
matth-x
/
MicroOcpp
Public
Notifications
You must be signed in to change notification settings
Fork
215
Star
540
Code
Issues
112
Pull requests
18
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MicroOcpp
/
tests
/
Security.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
58 lines (41 loc) · 1.45 KB
Breadcrumbs
MicroOcpp
/
tests
/
Security.cpp
Copy path
File metadata and controls
58 lines (41 loc) · 1.45 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
matth-x/MicroOcpp
//
Copyright Matthias Akstaller 2019 - 2024
//
MIT License
#
include
<
MicroOcpp/Version.h
>
#
if
MO_ENABLE_V201
#
include
<
MicroOcpp.h
>
#
include
<
MicroOcpp/Core/Connection.h
>
#
include
<
MicroOcpp/Core/Context.h
>
#
include
<
MicroOcpp/Core/Request.h
>
#
include
<
MicroOcpp/Model/Model.h
>
#
include
<
MicroOcpp/Model/Transactions/TransactionService.h
>
#
include
<
MicroOcpp/Operations/CustomOperation.h
>
#
include
<
MicroOcpp/Operations/SecurityEventNotification.h
>
#
include
<
MicroOcpp/Debug.h
>
#
include
<
catch2/catch.hpp
>
#
include
"
./helpers/testHelper.h
"
#
define
BASE_TIME
"
2023-01-01T00:00:00.000Z
"
using
namespace
MicroOcpp
;
TEST_CASE
(
"
Security
"
) {
printf
(
"
\n
Run %s
\n
"
,
"
Security
"
);
mocpp_set_timer
(custom_timer_cb);
//
initialize Context with dummy socket
LoopbackConnection loopback;
auto
filesystem =
makeDefaultFilesystemAdapter
(FilesystemOpt::Use_Mount_FormatOnFail);
mocpp_initialize
(loopback,
ChargerCredentials
(),
filesystem,
false
,
ProtocolVersion
(
2
,
0
,
1
));
SECTION
(
"
Manual SecurityEventNotification
"
) {
loop
();
MO_MEM_RESET
();
getOcppContext
()->
initiateRequest
(
makeRequest
(
new
Ocpp201::SecurityEventNotification
(
"
ReconfigurationOfSecurityParameters
"
,
getOcppContext
()->
getModel
().
getClock
().
now
())));
loop
();
MO_MEM_PRINT_STATS
();
}
mocpp_deinitialize
();
}
#
endif
//
MO_ENABLE_V201
Back
|
FazBrowse Home
|
New Git URL