16 package org.openkilda.pce.cache;
18 import static org.junit.Assert.assertEquals;
25 import org.junit.After;
26 import org.junit.Before;
27 import org.junit.Test;
29 import java.util.Arrays;
30 import java.util.Collections;
31 import java.util.HashSet;
38 public void setUp() throws Exception {
68 assertEquals(sw7, networkCache.
getSwitch(swId));
72 assertEquals(sw7updated, networkCache.
getSwitch(swId));
75 Set<SwitchInfoData> switches = networkCache.
dumpSwitches();
76 assertEquals(Collections.emptySet(), switches);
103 Set<SwitchInfoData> switches = networkCache.
dumpSwitches();
136 assertEquals(
new HashSet<>(), directlyConnected);
159 assertEquals(4, networkCache.
dumpIsls().size());
166 assertEquals(4, networkCache.
dumpIsls().size());
178 assertEquals(0, networkCache.
dumpIsls().size());
205 assertEquals(
new HashSet<>(Arrays.asList(
IslInfoData deleteIsl(String islId)
Set< SwitchInfoData > getControllerSwitches(String controller)
void getControllerSwitches()
Set< SwitchInfoData > getStateSwitches(SwitchState state)
SwitchInfoData updateSwitch(SwitchInfoData newSwitch)
static final IslInfoData isl32
Set< IslInfoData > getIslsBySource(SwitchId switchId)
IslInfoData createOrUpdateIsl(IslInfoData isl)
static final IslInfoData isl21
Set< SwitchInfoData > getDirectlyConnectedSwitches(SwitchId switchId)
static final IslInfoData isl12
Set< IslInfoData > getIslsByDestination(SwitchId switchId)
SwitchInfoData deleteSwitch(SwitchId switchId)
SwitchInfoData createSwitch(SwitchInfoData newSwitch)
static final IslInfoData isl42
void getIslsByDestination()
static final IslInfoData isl23
Set< IslInfoData > getIslsBySwitch(SwitchId switchId)
Set< SwitchInfoData > dumpSwitches()
static final IslInfoData isl24
void createOrUpdateSwitch()
IslInfoData getIsl(String islId)
static final SwitchInfoData sw4
SwitchInfoData getSwitch(SwitchId switchId)
static final SwitchInfoData sw3
void getDirectlyConnectedSwitches()
SwitchInfoData createOrUpdateSwitch(SwitchInfoData newSwitch)
static final SwitchInfoData sw2
static final IslInfoData isl14
static final SwitchInfoData sw1
static final IslInfoData isl41
Set< IslInfoData > dumpIsls()