Search in sources :

Example 6 with CdmaMastSegment

use of org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaMastSegment in project open-smart-grid-platform by OSGP.

the class CdmaMastSegmentTest method newCdmaMastSegment.

@Test
public void newCdmaMastSegment() {
    final CdmaMastSegment mastSegment = new CdmaMastSegment("200/1");
    final CdmaBatchDevice cd1 = new CdmaBatchDevice("cd1", this.loopbackAddress);
    mastSegment.addCdmaBatchDevice((short) 1, cd1);
    assertThat(mastSegment.getMastSegment()).isEqualTo("200/1");
    assertThat(mastSegment.empty()).withFailMessage("MastSegment should contain 1 device").isFalse();
}
Also used : CdmaMastSegment(org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaMastSegment) CdmaBatchDevice(org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaBatchDevice) Test(org.junit.jupiter.api.Test)

Example 7 with CdmaMastSegment

use of org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaMastSegment in project open-smart-grid-platform by OSGP.

the class CdmaMastSegmentTest method equalsWhenSegmentNameMatch.

@Test
public void equalsWhenSegmentNameMatch() {
    final CdmaMastSegment mastSegment1 = new CdmaMastSegment("200/1");
    final CdmaMastSegment mastSegment2 = new CdmaMastSegment("200/1");
    assertThat(mastSegment1).withFailMessage("Mast segments with the same name should be equal").isEqualTo(mastSegment2);
}
Also used : CdmaMastSegment(org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaMastSegment) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)7 CdmaMastSegment (org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaMastSegment)7 CdmaBatchDevice (org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaBatchDevice)4 CdmaBatch (org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaBatch)2 CdmaRun (org.opensmartgridplatform.adapter.domain.publiclighting.application.valueobjects.CdmaRun)1 CdmaDevice (org.opensmartgridplatform.domain.core.valueobjects.CdmaDevice)1