use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedGroupStoreTest method setUp.
@Before
public void setUp() throws Exception {
groupStoreImpl = new DistributedGroupStore();
groupStoreImpl.storageService = new TestStorageService();
groupStoreImpl.clusterCommunicator = new ClusterCommunicationServiceAdapter();
groupStoreImpl.mastershipService = new MasterOfAll();
groupStoreImpl.cfgService = new ComponentConfigAdapter();
groupStoreImpl.deviceService = new InternalDeviceServiceImpl();
ClusterService mockClusterService = createMock(ClusterService.class);
NodeId nodeId = new NodeId(NODE_ID);
MockControllerNode mockControllerNode = new MockControllerNode(nodeId);
expect(mockClusterService.getLocalNode()).andReturn(mockControllerNode).anyTimes();
replay(mockClusterService);
groupStoreImpl.clusterService = mockClusterService;
groupStoreImpl.activate(null);
groupStore = groupStoreImpl;
auditPendingReqQueue = TestUtils.getField(groupStoreImpl, "auditPendingReqQueue");
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedHostStoreTest method setUp.
@Before
public void setUp() {
ecXHostStore = new DistributedHostStore();
delegate = new TestStoreDelegate();
ecXHostStore.setDelegate(delegate);
ecXHostStore.storageService = new TestStorageService();
ecXHostStore.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedPiTranslationStoreTest method setUp.
/**
* Sets up the store and the storage service test harness.
*/
@Before
public void setUp() {
store = new AbstractDistributedPiTranslationStore<PiTranslatable, PiEntity>() {
@Override
protected String mapSimpleName() {
return "test";
}
};
store.storageService = new TestStorageService();
store.setDelegate(event -> {
});
store.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedRegionStoreTest method setUp.
/**
* Sets up the device key store and the storage service test harness.
*/
@Before
public void setUp() {
store = new TestStore();
store.storageService = new TestStorageService();
store.setDelegate(e -> this.event = e);
store.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class KubevirtPortManagerTest method setUp.
@Before
public void setUp() throws Exception {
kubevirtPortStore = new DistributedKubevirtPortStore();
TestUtils.setField(kubevirtPortStore, "coreService", new TestCoreService());
TestUtils.setField(kubevirtPortStore, "storageService", new TestStorageService());
TestUtils.setField(kubevirtPortStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
kubevirtPortStore.activate();
target = new KubevirtPortManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.kubevirtPortStore = kubevirtPortStore;
target.addListener(testListener);
target.activate();
}
Aggregations