use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.stat.Tlvs in project bgpcep by opendaylight.
the class SyncOptimizationTest method testIsDeltaSyncEnabledPositive.
@Test
public void testIsDeltaSyncEnabledPositive() {
final Tlvs tlvs = createTlvs(1L, true, true);
Mockito.doReturn(tlvs).when(this.pcepSession).getLocalTlvs();
Mockito.doReturn(tlvs).when(this.pcepSession).getRemoteTlvs();
final SyncOptimization syncOpt = new SyncOptimization(this.pcepSession);
assertTrue(syncOpt.isDeltaSyncEnabled());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.stat.Tlvs in project bgpcep by opendaylight.
the class SyncOptimizationTest method testIsDeltaSyncEnabledNegative.
@Test
public void testIsDeltaSyncEnabledNegative() {
final Tlvs localTlvs = createTlvs(1L, true, true);
final Tlvs remoteTlvs = createTlvs(2L, false, false);
Mockito.doReturn(localTlvs).when(this.pcepSession).getLocalTlvs();
Mockito.doReturn(remoteTlvs).when(this.pcepSession).getRemoteTlvs();
final SyncOptimization syncOpt = new SyncOptimization(this.pcepSession);
assertFalse(syncOpt.isDeltaSyncEnabled());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.stat.Tlvs in project bgpcep by opendaylight.
the class SyncOptimizationTest method testDoesLspDbMatchPositive.
@Test
public void testDoesLspDbMatchPositive() {
final Tlvs tlvs = createTlvs(1L, false, false);
Mockito.doReturn(tlvs).when(this.pcepSession).getLocalTlvs();
Mockito.doReturn(tlvs).when(this.pcepSession).getRemoteTlvs();
final SyncOptimization syncOpt = new SyncOptimization(this.pcepSession);
assertTrue(syncOpt.doesLspDbMatch());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.stat.Tlvs in project bgpcep by opendaylight.
the class SyncOptimizationTest method testIsSyncAvoidanceEnabledPositive.
@Test
public void testIsSyncAvoidanceEnabledPositive() {
final Tlvs tlvs = createTlvs(1L, true, false);
Mockito.doReturn(tlvs).when(this.pcepSession).getLocalTlvs();
Mockito.doReturn(tlvs).when(this.pcepSession).getRemoteTlvs();
final SyncOptimization syncOpt = new SyncOptimization(this.pcepSession);
assertTrue(syncOpt.isSyncAvoidanceEnabled());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.stat.Tlvs in project bgpcep by opendaylight.
the class SyncOptimizationTest method testIsDbVersionPresentNegative.
@Test
public void testIsDbVersionPresentNegative() {
final Tlvs tlvs = createTlvs(null, true, false);
Mockito.doReturn(tlvs).when(this.pcepSession).getLocalTlvs();
Mockito.doReturn(tlvs).when(this.pcepSession).getRemoteTlvs();
final SyncOptimization syncOpt = new SyncOptimization(this.pcepSession);
assertFalse(syncOpt.isDbVersionPresent());
}
Aggregations