Skip to content

Commit f9aefa7

Browse files
committed
add authorize tests to operational tests
1 parent 7be168e commit f9aefa7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/test/java/de/rwth/idsg/steve/OperationalTestSoapOCPP16.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)