本文整理汇总了Java中net.floodlightcontroller.storage.IStorageSourceListener类的典型用法代码示例。如果您正苦于以下问题:Java IStorageSourceListener类的具体用法?Java IStorageSourceListener怎么用?Java IStorageSourceListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IStorageSourceListener类属于net.floodlightcontroller.storage包,在下文中一共展示了IStorageSourceListener类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testInsertNotification
import net.floodlightcontroller.storage.IStorageSourceListener; //导入依赖的package包/类
@Test
public void testInsertNotification() {
// Set up the listener and record the expected notification
IStorageSourceListener mockListener = createNiceMock(IStorageSourceListener.class);
Set<Object> expectedKeys = new HashSet<Object>();
expectedKeys.add("999-99-9999");
mockListener.rowsModified(PERSON_TABLE_NAME, expectedKeys);
replay(mockListener);
// Now try it for real
storageSource.addListener(PERSON_TABLE_NAME, mockListener);
// Create a new person, which should trigger the listener
Object[] newPerson = {"999-99-9999", "Serena", "Williams", 22, true};
insertPerson(newPerson);
verify(mockListener);
}
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:StorageTest.java
示例2: testUpdateNotification
import net.floodlightcontroller.storage.IStorageSourceListener; //导入依赖的package包/类
@Test
public void testUpdateNotification() {
// Set up the listener and record the expected notification
IStorageSourceListener mockListener = createNiceMock(IStorageSourceListener.class);
Set<Object> expectedKeys = new HashSet<Object>();
expectedKeys.add("111-11-1111");
mockListener.rowsModified(PERSON_TABLE_NAME, expectedKeys);
replay(mockListener);
// Now try it for real
storageSource.addListener(PERSON_TABLE_NAME, mockListener);
// Create a new person, which should trigger the listener
Map<String,Object> updateValues = new HashMap<String,Object>();
updateValues.put(PERSON_FIRST_NAME, "Tennis");
storageSource.updateRow(PERSON_TABLE_NAME, "111-11-1111", updateValues);
verify(mockListener);
}
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:21,代码来源:StorageTest.java
示例3: testDeleteNotification
import net.floodlightcontroller.storage.IStorageSourceListener; //导入依赖的package包/类
@Test
public void testDeleteNotification() {
IStorageSourceListener mockListener = createNiceMock(IStorageSourceListener.class);
Set<Object> expectedKeys = new HashSet<Object>();
expectedKeys.add("111-11-1111");
mockListener.rowsDeleted(PERSON_TABLE_NAME, expectedKeys);
replay(mockListener);
// Now try it for real
storageSource.addListener(PERSON_TABLE_NAME, mockListener);
// Create a new person, which should trigger the listener
storageSource.deleteRow(PERSON_TABLE_NAME, "111-11-1111");
verify(mockListener);
}
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:18,代码来源:StorageTest.java
注:本文中的net.floodlightcontroller.storage.IStorageSourceListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论