Search in sources :

Example 1 with Iec60870SingleCommandAsduHandler

use of org.opensmartgridplatform.simulator.protocol.iec60870.server.handlers.Iec60870SingleCommandAsduHandler in project open-smart-grid-platform by OSGP.

the class Iec60870AsduHandlerRegistryTest method registryShouldReturnSingleCommandHandlerForSingleCommandAsduType.

@Test
public void registryShouldReturnSingleCommandHandlerForSingleCommandAsduType() throws Exception {
    // arrange
    final ASduType asduType = ASduType.C_SC_NA_1;
    final Iec60870SingleCommandAsduHandler expected = this.iec60870SingleCommandAsduHandler;
    // act
    final Iec60870AsduHandler actual = this.iec60870AsduHandlerRegistry.getHandler(asduType);
    // assert
    assertThat(actual).isEqualTo(expected);
}
Also used : ASduType(org.openmuc.j60870.ASduType) Iec60870AsduHandler(org.opensmartgridplatform.iec60870.Iec60870AsduHandler) Iec60870SingleCommandAsduHandler(org.opensmartgridplatform.simulator.protocol.iec60870.server.handlers.Iec60870SingleCommandAsduHandler) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

Test (org.junit.jupiter.api.Test)1 ASduType (org.openmuc.j60870.ASduType)1 Iec60870AsduHandler (org.opensmartgridplatform.iec60870.Iec60870AsduHandler)1 Iec60870SingleCommandAsduHandler (org.opensmartgridplatform.simulator.protocol.iec60870.server.handlers.Iec60870SingleCommandAsduHandler)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1