Skip to content

Commit 83b6b3d

Browse files
committed
Add asserts to parallel sessions integration test
Add asserts to the OCPP 2.1 integration test case which tests parallel sessions with different protocol versions.
1 parent a4e4b80 commit 83b6b3d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ocpp-v2-test/src/test/java/eu/chargetime/ocpp/test/OCPP21MultiProtocolIntegrationTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,27 @@ public void testMultiProtocolCsmsRunningParallelSessionsWithDifferentProtocolVer
140140
FakeCSMS csms = setupAndStartCSMS(OCPP2_1_FIRST);
141141

142142
FakeChargingStation cs16 = buildAndConnectChargingStation(OCPP1_6_ONLY, csms);
143+
assertThat(cs16.getProtocolVersion(), is(OCPP1_6));
143144
cs16.sendBootNotification("vendor", "model");
144145

145146
FakeChargingStation cs201 = buildAndConnectChargingStation(OCPP2_0_1_ONLY, csms);
147+
assertThat(cs201.getProtocolVersion(), is(OCPP2_0_1));
146148
cs201.sendBootNotification("vendor", "model");
147149

148150
FakeChargingStation cs21 = buildAndConnectChargingStation(OCPP2_1_ONLY, csms);
151+
assertThat(cs21.getProtocolVersion(), is(OCPP2_1));
149152
cs21.sendBootNotification("vendor", "model");
150153

151154
reconnectChargingStation(cs16, csms);
155+
assertThat(cs16.getProtocolVersion(), is(OCPP1_6));
152156
cs16.sendBootNotification("vendor", "model");
153157

154158
reconnectChargingStation(cs201, csms);
159+
assertThat(cs201.getProtocolVersion(), is(OCPP2_0_1));
155160
cs201.sendBootNotification("vendor", "model");
156161

157162
reconnectChargingStation(cs21, csms);
163+
assertThat(cs21.getProtocolVersion(), is(OCPP2_1));
158164
cs21.sendBootNotification("vendor", "model");
159165
}
160166

0 commit comments

Comments
 (0)