use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedDevicePipeconfMappingStoreTest method setUp.
/**
* Sets up the device key store and the storage service test harness.
*/
@Before
public void setUp() {
store = new DistributedDevicePipeconfMappingStore();
store.storageService = new TestStorageService();
store.setDelegate(event -> {
});
store.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedNetworkConfigStoreTest method setUp.
/**
* Sets up the config store and the storage service test harness.
*/
@Before
public void setUp() {
configStore = new DistributedNetworkConfigStore();
configStore.storageService = new TestStorageService();
configStore.setDelegate(event -> {
});
configStore.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedApplicationIdStoreTest method setUp.
@Before
public void setUp() throws Exception {
appIdStore = new DistributedApplicationIdStore();
appIdStore.storageService = new TestStorageService();
appIdStore.activate();
idStore = appIdStore;
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class ECFlowRuleStoreTest method setUp.
@Before
public void setUp() throws Exception {
flowStoreImpl = new ECFlowRuleStore();
flowStoreImpl.storageService = new TestStorageService() {
@Override
public <K, V> ConsistentMapBuilder<K, V> consistentMapBuilder() {
return new ConsistentMapBuilder<K, V>() {
@Override
public AsyncConsistentMap<K, V> buildAsyncMap() {
return new AsyncConsistentMapAdapter<K, V>();
}
@Override
public ConsistentMap<K, V> build() {
return null;
}
};
}
};
ReplicaInfoManager replicaInfoManager = new ReplicaInfoManager();
replicaInfoManager.mastershipService = new MasterOfAll();
flowStoreImpl.replicaInfoManager = replicaInfoManager;
mockClusterService = createMock(ClusterService.class);
flowStoreImpl.clusterService = mockClusterService;
nodeId = new NodeId("1");
mockControllerNode = new MockControllerNode(nodeId);
expect(mockClusterService.getLocalNode()).andReturn(mockControllerNode).anyTimes();
replay(mockClusterService);
flowStoreImpl.clusterCommunicator = new ClusterCommunicationServiceAdapter();
flowStoreImpl.mastershipService = new MasterOfAll();
flowStoreImpl.deviceService = new DeviceServiceAdapter();
flowStoreImpl.coreService = new CoreServiceAdapter();
flowStoreImpl.configService = new ComponentConfigAdapter();
flowStoreImpl.persistenceService = new PersistenceServiceAdapter();
flowStoreImpl.activate(context);
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class GossipIntentStoreTest method setUp.
@Override
@Before
public void setUp() {
intentStore = new GossipIntentStore();
intentStore.storageService = new TestStorageService();
intentStore.partitionService = new WorkPartitionServiceAdapter();
intentStore.clusterService = new ClusterServiceAdapter();
super.setUp();
builder1 = HostToHostIntent.builder().one(hid("12:34:56:78:91:ab/1")).two(hid("12:34:56:78:91:ac/1")).appId(APP_ID);
intentStore.configService = new MockComponentConfigService();
intentStore.activate(null);
}
Aggregations