1 package org.opendaylight.controller.cluster.datastore.shardstrategy;
5 import org.junit.rules.ExpectedException;
6 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
8 import static junit.framework.Assert.assertNotNull;
10 public class ShardStrategyFactoryTest {
13 public ExpectedException expectedEx = ExpectedException.none();
16 public void testGetStrategy(){
17 ShardStrategy strategy = ShardStrategyFactory.getStrategy(TestModel.TEST_PATH);
18 assertNotNull(strategy);
22 public void testGetStrategyNullPointerExceptionWhenPathIsNull(){
23 expectedEx.expect(NullPointerException.class);
24 expectedEx.expectMessage("path should not be null");
26 ShardStrategyFactory.getStrategy(null);
©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.