Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Notify listeners on applySnapshot
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
shardstrategy
/
ShardStrategyFactoryTest.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/ShardStrategyFactoryTest.java
b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/ShardStrategyFactoryTest.java
index 3d7276c66cd15a37efbfc7c295ff587bc620b28c..ed4467df8e055b329cbd59cf34490b8583b538f6 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/ShardStrategyFactoryTest.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/ShardStrategyFactoryTest.java
@@
-10,7
+10,7
@@
package org.opendaylight.controller.cluster.datastore.shardstrategy;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import org.junit.Before
Class
;
+import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@
-21,26
+21,25
@@
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class ShardStrategyFactoryTest {
public class ShardStrategyFactoryTest {
+ ShardStrategyFactory factory;
+
@Rule
public ExpectedException expectedEx = ExpectedException.none();
@Rule
public ExpectedException expectedEx = ExpectedException.none();
- @Before
Class
- public
static void setUpClass()
{
-
ShardStrategyFactory.setConfiguration
(new ConfigurationImpl("module-shards.conf", "modules.conf"));
+ @Before
+ public
void setUp()
{
+
factory = new ShardStrategyFactory
(new ConfigurationImpl("module-shards.conf", "modules.conf"));
}
@Test
public void testGetStrategy() {
}
@Test
public void testGetStrategy() {
- ShardStrategy strategy =
- ShardStrategyFactory.getStrategy(TestModel.TEST_PATH);
+ ShardStrategy strategy = factory.getStrategy(TestModel.TEST_PATH);
assertNotNull(strategy);
}
@Test
public void testGetStrategyForKnownModuleName() {
assertNotNull(strategy);
}
@Test
public void testGetStrategyForKnownModuleName() {
- ShardStrategy strategy =
- ShardStrategyFactory.getStrategy(
- YangInstanceIdentifier.of(CarsModel.BASE_QNAME));
+ ShardStrategy strategy = factory.getStrategy(YangInstanceIdentifier.of(CarsModel.BASE_QNAME));
assertTrue(strategy instanceof ModuleShardStrategy);
}
assertTrue(strategy instanceof ModuleShardStrategy);
}
@@
-50,7
+49,7
@@
public class ShardStrategyFactoryTest {
expectedEx.expect(NullPointerException.class);
expectedEx.expectMessage("path should not be null");
expectedEx.expect(NullPointerException.class);
expectedEx.expectMessage("path should not be null");
-
ShardStrategyF
actory.getStrategy(null);
+
f
actory.getStrategy(null);
}
}
}
}