File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/test/java/de/rwth/idsg/steve Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,30 @@ public void testRegisteredCP() {
102102 Assert .assertTrue (details .getChargeBox ().getOcppProtocol ().contains ("ocpp1.6" ));
103103 }
104104
105+ @ Test
106+ public void testRegisteredIdTag () {
107+ CentralSystemService client = getForOcpp16 (path );
108+
109+ AuthorizeResponse auth = client .authorize (
110+ new AuthorizeRequest ().withIdTag (REGISTERED_OCPP_TAG ),
111+ REGISTERED_CHARGE_BOX_ID );
112+
113+ Assert .assertNotNull (auth );
114+ Assert .assertEquals (AuthorizationStatus .ACCEPTED , auth .getIdTagInfo ().getStatus ());
115+ }
116+
117+ @ Test
118+ public void testUnregisteredIdTag () {
119+ CentralSystemService client = getForOcpp16 (path );
120+
121+ AuthorizeResponse auth = client .authorize (
122+ new AuthorizeRequest ().withIdTag (getRandomString ()),
123+ REGISTERED_CHARGE_BOX_ID );
124+
125+ Assert .assertNotNull (auth );
126+ Assert .assertEquals (AuthorizationStatus .INVALID , auth .getIdTagInfo ().getStatus ());
127+ }
128+
105129 @ Test
106130 public void testStatusNotification () {
107131 CentralSystemService client = getForOcpp16 (path );
You can’t perform that action at this time.
0 commit comments