use of ocpp.cs._2015._10.CentralSystemService in project EVSUPERVISION by EnergyTIC.
the class ApplicationTest method testOcpp15.
@Test
public void testOcpp15() {
CentralSystemService client = getForOcpp15(path);
ocpp.cs._2012._06.BootNotificationResponse boot = client.bootNotification(new ocpp.cs._2012._06.BootNotificationRequest().withChargePointVendor(getRandomString()).withChargePointModel(getRandomString()), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(boot);
Assertions.assertEquals(ocpp.cs._2012._06.RegistrationStatus.ACCEPTED, boot.getStatus());
ocpp.cs._2012._06.AuthorizeResponse auth = client.authorize(new ocpp.cs._2012._06.AuthorizeRequest().withIdTag(REGISTERED_OCPP_TAG), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(auth);
Assertions.assertEquals(ocpp.cs._2012._06.AuthorizationStatus.ACCEPTED, auth.getIdTagInfo().getStatus());
}
use of ocpp.cs._2015._10.CentralSystemService in project EVSUPERVISION by EnergyTIC.
the class ApplicationTest method testOcpp12.
@Test
public void testOcpp12() {
ocpp.cs._2010._08.CentralSystemService client = getForOcpp12(path);
BootNotificationResponse boot = client.bootNotification(new BootNotificationRequest().withChargePointVendor(getRandomString()).withChargePointModel(getRandomString()), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(boot);
Assertions.assertEquals(RegistrationStatus.ACCEPTED, boot.getStatus());
AuthorizeResponse auth = client.authorize(new AuthorizeRequest().withIdTag(REGISTERED_OCPP_TAG), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(auth);
Assertions.assertEquals(AuthorizationStatus.ACCEPTED, auth.getIdTagInfo().getStatus());
}
use of ocpp.cs._2015._10.CentralSystemService in project EVSUPERVISION by EnergyTIC.
the class OperationalTestSoapOCPP16 method testRegisteredIdTag.
@Test
public void testRegisteredIdTag() {
CentralSystemService client = getForOcpp16(path);
AuthorizeResponse auth = client.authorize(new AuthorizeRequest().withIdTag(REGISTERED_OCPP_TAG), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(auth);
Assertions.assertEquals(AuthorizationStatus.ACCEPTED, auth.getIdTagInfo().getStatus());
}
use of ocpp.cs._2015._10.CentralSystemService in project EVSUPERVISION by EnergyTIC.
the class OperationalTestSoapOCPP16 method testInTransactionStatusOfIdTag.
@Test
public void testInTransactionStatusOfIdTag() {
CentralSystemService client = getForOcpp16(path);
StartTransactionResponse start = client.startTransaction(new StartTransactionRequest().withConnectorId(2).withIdTag(REGISTERED_OCPP_TAG).withTimestamp(DateTime.now()).withMeterStart(0), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(start);
Assertions.assertTrue(start.getTransactionId() > 0);
Assertions.assertTrue(__DatabasePreparer__.getOcppTagRecord(REGISTERED_OCPP_TAG).getInTransaction());
StopTransactionResponse stop = client.stopTransaction(new StopTransactionRequest().withTransactionId(start.getTransactionId()).withTimestamp(DateTime.now()).withIdTag(REGISTERED_OCPP_TAG).withMeterStop(30), REGISTERED_CHARGE_BOX_ID);
Assertions.assertNotNull(stop);
Assertions.assertFalse(__DatabasePreparer__.getOcppTagRecord(REGISTERED_OCPP_TAG).getInTransaction());
}
use of ocpp.cs._2015._10.CentralSystemService in project EVSUPERVISION by EnergyTIC.
the class OperationalTestSoapOCPP16 method testUnregisteredCP.
@Test
public void testUnregisteredCP() {
Assertions.assertFalse(SteveConfiguration.CONFIG.getOcpp().isAutoRegisterUnknownStations());
CentralSystemService client = getForOcpp16(path);
BootNotificationResponse boot = client.bootNotification(new BootNotificationRequest().withChargePointVendor(getRandomString()).withChargePointModel(getRandomString()), getRandomString());
Assertions.assertNotNull(boot);
Assertions.assertNotEquals(RegistrationStatus.ACCEPTED, boot.getStatus());
}
Aggregations