当前位置: 首页>>代码示例>>Java>>正文


Java PeopleModel.emptyContainer方法代码示例

本文整理汇总了Java中org.opendaylight.controller.md.cluster.datastore.model.PeopleModel.emptyContainer方法的典型用法代码示例。如果您正苦于以下问题:Java PeopleModel.emptyContainer方法的具体用法?Java PeopleModel.emptyContainer怎么用?Java PeopleModel.emptyContainer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opendaylight.controller.md.cluster.datastore.model.PeopleModel的用法示例。


在下文中一共展示了PeopleModel.emptyContainer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testWriteTransactionWithMultipleShards

import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testWriteTransactionWithMultipleShards() throws Exception {
    initDatastoresWithCarsAndPeople("testWriteTransactionWithMultipleShards");

    final DOMStoreWriteTransaction writeTx = followerDistributedDataStore.newWriteOnlyTransaction();
    assertNotNull("newWriteOnlyTransaction returned null", writeTx);

    final YangInstanceIdentifier carsPath = CarsModel.BASE_PATH;
    final NormalizedNode<?, ?> carsNode = CarsModel.emptyContainer();
    writeTx.write(carsPath, carsNode);

    final YangInstanceIdentifier peoplePath = PeopleModel.BASE_PATH;
    final NormalizedNode<?, ?> peopleNode = PeopleModel.emptyContainer();
    writeTx.write(peoplePath, peopleNode);

    followerTestKit.doCommit(writeTx.ready());

    final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();

    verifyNode(readTx, carsPath, carsNode);
    verifyNode(readTx, peoplePath, peopleNode);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:23,代码来源:DistributedDataStoreRemotingIntegrationTest.java

示例2: testReadWriteTransactionWithMultipleShards

import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testReadWriteTransactionWithMultipleShards() throws Exception {
    initDatastoresWithCarsAndPeople("testReadWriteTransactionWithMultipleShards");

    final DOMStoreReadWriteTransaction rwTx = followerDistributedDataStore.newReadWriteTransaction();
    assertNotNull("newReadWriteTransaction returned null", rwTx);

    final YangInstanceIdentifier carsPath = CarsModel.BASE_PATH;
    final NormalizedNode<?, ?> carsNode = CarsModel.emptyContainer();
    rwTx.write(carsPath, carsNode);

    final YangInstanceIdentifier peoplePath = PeopleModel.BASE_PATH;
    final NormalizedNode<?, ?> peopleNode = PeopleModel.emptyContainer();
    rwTx.write(peoplePath, peopleNode);

    followerTestKit.doCommit(rwTx.ready());

    final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();

    verifyNode(readTx, carsPath, carsNode);
    verifyNode(readTx, peoplePath, peopleNode);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:23,代码来源:DistributedDataStoreRemotingIntegrationTest.java

示例3: testMergeWithInvalidNamespace

import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testMergeWithInvalidNamespace() throws DataValidationFailedException {
    NormalizedNode<?, ?> normalizedNode = PeopleModel.emptyContainer();
    YangInstanceIdentifier path = PeopleModel.BASE_PATH;

    pruningDataTreeModification.merge(path, normalizedNode);

    verify(mockModification, times(1)).merge(path, normalizedNode);

    DataTreeCandidateTip candidate = getCandidate();
    assertEquals("getModificationType", ModificationType.UNMODIFIED, candidate.getRootNode().getModificationType());
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:13,代码来源:PruningDataTreeModificationTest.java

示例4: testWriteWithInvalidNamespace

import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; //导入方法依赖的package包/类
@Test
public void testWriteWithInvalidNamespace() throws DataValidationFailedException {
    NormalizedNode<?, ?> normalizedNode = PeopleModel.emptyContainer();
    YangInstanceIdentifier path = PeopleModel.BASE_PATH;

    pruningDataTreeModification.write(path, normalizedNode);

    verify(mockModification, times(1)).write(path, normalizedNode);

    DataTreeCandidateTip candidate = getCandidate();
    assertEquals("getModificationType", ModificationType.UNMODIFIED, candidate.getRootNode().getModificationType());
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:13,代码来源:PruningDataTreeModificationTest.java


注:本文中的org.opendaylight.controller.md.cluster.datastore.model.PeopleModel.emptyContainer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。